Revert "fix: optimization: Various PVS-Studio warnings"
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user