mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 10:16:50 +00:00
fixes compiler warnings (#9619)
* compiler warnings: adds SYSTEM to [target_]include_directories to skip warnings originating from dependencies * compiler warnings: uninitialized/unused variables, missing parenthesis, pragma * compiler warnings: redundant template type, missing curly braces, pass 0 instead of NULL as int argument * compiler warnings: removes fclose(fp) where fp==nullptr since fclose() has attribute __nonnull((1)) * compiler warnings: uninitialized variables, missing parentheses, missing curly braces * compiler warnings: ? as lower precedence than << * compiler warnings: unused variable * compiler warnings: unused result * compiler warnings: undefined/unused variable * compiler warnings: uninitialized variable
This commit is contained in:
committed by
GitHub
parent
9569841091
commit
3ecca6116d
@@ -1,4 +1,3 @@
|
||||
#pragma once
|
||||
#include <wx/wxprec.h>
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
@@ -311,4 +310,4 @@ void MyScrollbar::OnMouseWheel(wxMouseEvent &event)
|
||||
}
|
||||
Refresh();
|
||||
Update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ void StateColor::append(unsigned long color, int states)
|
||||
{
|
||||
if ((color & 0xff000000) == 0)
|
||||
color |= 0xff000000;
|
||||
wxColour cl; cl.SetRGBA(color & 0xff00ff00 | ((color & 0xff) << 16) | ((color >> 16) & 0xff));
|
||||
wxColour cl; cl.SetRGBA((color & 0xff00ff00) | ((color & 0xff) << 16) | ((color >> 16) & 0xff));
|
||||
append(cl, states);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void StateHandler::update_binds()
|
||||
int diff = bind_states ^ bind_states_;
|
||||
State states[] = {Enabled, Checked, Focused, Hovered, Pressed};
|
||||
wxEventType events[] = {EVT_ENABLE_CHANGED, wxEVT_CHECKBOX, wxEVT_SET_FOCUS, wxEVT_ENTER_WINDOW, wxEVT_LEFT_DOWN};
|
||||
wxEventType events2[] = {{0}, {0}, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
|
||||
wxEventType events2[] = {0, 0, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
int s = states[i];
|
||||
if (diff & s) {
|
||||
@@ -74,7 +74,7 @@ void StateHandler::set_state(int state, int mask)
|
||||
{
|
||||
if ((states_ & mask) == (state & mask)) return;
|
||||
int old = states_;
|
||||
states_ = states_ & ~mask | state & mask;
|
||||
states_ = (states_ & ~mask) | (state & mask);
|
||||
if (old != states_ && (old | states2_) != (states_ | states2_)) {
|
||||
if (parent_)
|
||||
parent_->changed(states_ | states2_);
|
||||
@@ -94,7 +94,7 @@ void StateHandler::changed(wxEvent &event)
|
||||
{
|
||||
event.Skip();
|
||||
wxEventType events[] = {EVT_ENABLE_CHANGED, wxEVT_CHECKBOX, wxEVT_SET_FOCUS, wxEVT_ENTER_WINDOW, wxEVT_LEFT_DOWN};
|
||||
wxEventType events2[] = {{0}, {0}, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
|
||||
wxEventType events2[] = {0, 0, wxEVT_KILL_FOCUS, wxEVT_LEAVE_WINDOW, wxEVT_LEFT_UP};
|
||||
int old = states_;
|
||||
// some events are from another window (ex: text_ctrl of TextInput), save state in states2_ to avoid conflicts
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user