Skip to content

Little optimization for __scribble_font_add_all_from_project - one var could be removed #599

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gnysek opened this issue Mar 13, 2025 · 1 comment

Comments

@gnysek
Copy link

gnysek commented Mar 13, 2025

{
var _font = _fontArray[_i];
if (not font_exists(_font)) continue;
var _skip = false;
var _tagArray = asset_get_tags(_fontArray[_i], asset_font);

var _font seems to be used only for if font_exists, later _fontArray[_i] is used again, so maybe there's no need to use var _font at all?

I mean replacing:

var _font = _fontArray[_i]; 
if (not font_exists(_font)) continue;

with

if (not font_exists(_fontArray[_i])) continue;
@JujuAdams
Copy link
Owner

Later uses of _fontArray[_i] should be replaced with _font.

@JujuAdams JujuAdams closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants