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:
Echelon9 committed 2011-08-14 13:14:35 +00:00
1 parent 0504a180d3
commit 67eb406443
34 files changed
+81 -82

No files matched your search

+1 -1
View File
@@ -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);