mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
Revert "fix: optimization: Various PVS-Studio warnings"
This commit is contained in:
parent
a7ef7bb365
commit
ba046a52c0
90 changed files with 259 additions and 274 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue