mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-11 04:31:35 -10:00
PVS-Studio: Fix V805. Decreased performance. It is inefficient to identify an empty string by using 'strlen(str) > 0' construct
This commit is contained in:
1 parent
0504a180d3
commit
67eb406443
34 files changed
+81
-82
No files matched your search
+1
-1
@@ -11398,7 +11398,7 @@ ADE_FUNC(loadModel, l_Graphics, "string Filename", "Loads the model - will not s
|
||||
if(!ade_get_args(L, "s", &s))
|
||||
return ade_set_error(L, "o", l_Model.Set(-1));
|
||||
|
||||
if (strlen(s) == 0)
|
||||
if (s[0] == '\0')
|
||||
return ade_set_error(L, "o", l_Model.Set(-1));
|
||||
|
||||
model_num = model_load(s, 0, NULL);
|
||||
|
||||
Reference in new issue
Block a user