mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
fixed compiler warnings reported by gcc/clang
* changed some catch blocks to use exception references instead of value types * fixed missing use of SCR_WIDTH/SCR_HEIGHT for glfwCreateWindow * fixed implicit numeric type casts regarding signedness * removed unused variables Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -53,7 +53,7 @@ public:
|
||||
geometryCode = gShaderStream.str();
|
||||
}
|
||||
}
|
||||
catch (std::ifstream::failure e)
|
||||
catch (std::ifstream::failure& e)
|
||||
{
|
||||
std::cout << "ERROR::SHADER::FILE_NOT_SUCCESFULLY_READ" << std::endl;
|
||||
}
|
||||
@@ -188,4 +188,4 @@ private:
|
||||
}
|
||||
}
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
vertexCode = vShaderStream.str();
|
||||
fragmentCode = fShaderStream.str();
|
||||
}
|
||||
catch (std::ifstream::failure e)
|
||||
catch (std::ifstream::failure& e)
|
||||
{
|
||||
std::cout << "ERROR::SHADER::FILE_NOT_SUCCESFULLY_READ" << std::endl;
|
||||
}
|
||||
@@ -162,4 +162,4 @@ private:
|
||||
}
|
||||
}
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
vertexCode = vShaderStream.str();
|
||||
fragmentCode = fShaderStream.str();
|
||||
}
|
||||
catch (std::ifstream::failure e)
|
||||
catch (std::ifstream::failure& e)
|
||||
{
|
||||
std::cout << "ERROR::SHADER::FILE_NOT_SUCCESFULLY_READ" << std::endl;
|
||||
}
|
||||
@@ -118,4 +118,4 @@ private:
|
||||
}
|
||||
}
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user