Revert "fix: optimization: Various PVS-Studio warnings"

This commit is contained in:
MihailRis
2024-08-02 14:51:44 +03:00
committed by GitHub
parent a7ef7bb365
commit ba046a52c0
90 changed files with 259 additions and 274 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ void Events::bind(const std::string& name, inputtype type, mousecode code) {
}
void Events::bind(const std::string& name, inputtype type, int code) {
bindings.try_emplace(name, Binding(type, code));
bindings.emplace(name, Binding(type, code));
}
void Events::rebind(const std::string& name, inputtype type, int code) {
+2 -2
View File
@@ -205,11 +205,11 @@ void Window::clearDepth() {
glClear(GL_DEPTH_BUFFER_BIT);
}
void Window::setBgColor(const glm::vec3 &color) {
void Window::setBgColor(glm::vec3 color) {
glClearColor(color.r, color.g, color.b, 1.0f);
}
void Window::setBgColor(const glm::vec4 &color) {
void Window::setBgColor(glm::vec4 color) {
glClearColor(color.r, color.g, color.b, color.a);
}
+2 -2
View File
@@ -49,8 +49,8 @@ public:
static void clear();
static void clearDepth();
static void setBgColor(const glm::vec3 &color);
static void setBgColor(const glm::vec4 &color);
static void setBgColor(glm::vec3 color);
static void setBgColor(glm::vec4 color);
static double time();
static const char* getClipboardText();
static void setClipboardText(const char* text);
+1 -1
View File
@@ -142,7 +142,7 @@ struct Binding {
bool state = false;
bool justChange = false;
Binding() = default;
Binding(){}
Binding(inputtype type, int code) : type(type), code(code) {}
bool active() const {