summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-02-28 23:03:10 +0100
committerGitHub <noreply@github.com>2017-02-28 23:03:10 +0100
commita1cbe8e22bec516b138436d06282046466e89c79 (patch)
tree24c8d7757a3f1d9e3543a8eff1363f0f7943cbc6 /servers
parentc5df3d4d8d3d6ee74b0dad5eeb45f318c8b205a9 (diff)
parentf50488a36188d5975bfa8554687a1acdd394d6a9 (diff)
Merge pull request #7878 from RebelliousX/else
Bunch of missing `else` statements and general logic
Diffstat (limited to 'servers')
-rw-r--r--servers/physics/shape_sw.cpp2
-rw-r--r--servers/visual/shader_language.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp
index 10500a306f..dec1c75d9f 100644
--- a/servers/physics/shape_sw.cpp
+++ b/servers/physics/shape_sw.cpp
@@ -181,7 +181,7 @@ void RayShapeSW::get_supports(const Vector3& p_normal,int p_max,Vector3 *r_suppo
r_amount=2;
r_supports[0]=Vector3(0,0,0);
r_supports[1]=Vector3(0,0,length);
- } if (p_normal.z>0) {
+ } else if (p_normal.z>0) {
r_amount=1;
*r_supports=Vector3(0,0,length);
} else {
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp
index 7dfd9822f7..c680013efa 100644
--- a/servers/visual/shader_language.cpp
+++ b/servers/visual/shader_language.cpp
@@ -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;
}