You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs - Remove some checks (always false: unsigned never < 0) - Fix some if statements based on reviews. - Bunch of missing `else` statements
This commit is contained in:
committed by
REBELLIOUSX\Rebel_X
parent
0f8c6dd382
commit
f50488a361
@@ -307,7 +307,7 @@ ShaderLanguage::Token ShaderLanguage::_get_token() {
|
||||
} if (GETCHAR(0)=='*' && GETCHAR(1)=='/') {
|
||||
char_idx+=2;
|
||||
break;
|
||||
} if (GETCHAR(0)=='\n') {
|
||||
} else if (GETCHAR(0)=='\n') {
|
||||
tk_line++;
|
||||
}
|
||||
|
||||
@@ -3241,7 +3241,7 @@ Error ShaderLanguage::_parse_shader(const Map< StringName, Map<StringName,DataTy
|
||||
_set_error("void datatype not allowed here");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
if (!uniform && type<TYPE_FLOAT && type>TYPE_VEC4) {
|
||||
if (!uniform && type<TYPE_FLOAT && type>TYPE_VEC4) { // FIXME: always false! should it be || instead?
|
||||
_set_error("Invalid type for varying, only float,vec2,vec3,vec4 allowed.");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user