mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +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
@@ -778,7 +778,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_vendor_item()
|
||||
m_filament_custom_vendor_input->SetSize(NAME_OPTION_COMBOBOX_SIZE);
|
||||
textInputSizer->Add(m_filament_custom_vendor_input, 0, wxEXPAND | wxALL, 0);
|
||||
m_filament_custom_vendor_input->GetTextCtrl()->SetHint(_L("Input Custom Vendor"));
|
||||
m_filament_custom_vendor_input->GetTextCtrl()->Bind(wxEVT_CHAR, [this](wxKeyEvent &event) {
|
||||
m_filament_custom_vendor_input->GetTextCtrl()->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
|
||||
int key = event.GetKeyCode();
|
||||
if (cannot_input_key.find(key) != cannot_input_key.end()) {
|
||||
event.Skip(false);
|
||||
@@ -888,7 +888,7 @@ wxBoxSizer *CreateFilamentPresetDialog::create_serial_item()
|
||||
m_filament_serial_input = new TextInput(this, "", "", "", wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE, wxTE_PROCESS_ENTER);
|
||||
m_filament_serial_input->GetTextCtrl()->SetMaxLength(50);
|
||||
comboBoxSizer->Add(m_filament_serial_input, 0, wxEXPAND | wxALL, 0);
|
||||
m_filament_serial_input->GetTextCtrl()->Bind(wxEVT_CHAR, [this](wxKeyEvent &event) {
|
||||
m_filament_serial_input->GetTextCtrl()->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
|
||||
int key = event.GetKeyCode();
|
||||
if (cannot_input_key.find(key) != cannot_input_key.end()) {
|
||||
event.Skip(false);
|
||||
@@ -1750,7 +1750,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_printer_item(wxWindow *parent)
|
||||
|
||||
m_custom_vendor_text_ctrl = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE);
|
||||
m_custom_vendor_text_ctrl->SetHint(_L("Input Custom Vendor"));
|
||||
m_custom_vendor_text_ctrl->Bind(wxEVT_CHAR, [this](wxKeyEvent &event) {
|
||||
m_custom_vendor_text_ctrl->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
|
||||
int key = event.GetKeyCode();
|
||||
if (cannot_input_key.find(key) != cannot_input_key.end()) { // "@" can not be inputed
|
||||
event.Skip(false);
|
||||
@@ -1762,7 +1762,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_printer_item(wxWindow *parent)
|
||||
m_custom_vendor_text_ctrl->Hide();
|
||||
m_custom_model_text_ctrl = new wxTextCtrl(parent, wxID_ANY, "", wxDefaultPosition, NAME_OPTION_COMBOBOX_SIZE);
|
||||
m_custom_model_text_ctrl->SetHint(_L("Input Custom Model"));
|
||||
m_custom_model_text_ctrl->Bind(wxEVT_CHAR, [this](wxKeyEvent &event) {
|
||||
m_custom_model_text_ctrl->Bind(wxEVT_CHAR, [](wxKeyEvent &event) {
|
||||
int key = event.GetKeyCode();
|
||||
if (cannot_input_key.find(key) != cannot_input_key.end()) { // "@" can not be inputed
|
||||
event.Skip(false);
|
||||
@@ -3242,8 +3242,8 @@ CreatePresetSuccessfulDialog::CreatePresetSuccessfulDialog(wxWindow *parent, con
|
||||
horizontal_sizer->Add(success_bitmap_sizer, 0, wxEXPAND | wxALL, FromDIP(5));
|
||||
|
||||
wxBoxSizer *success_text_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
wxStaticText *success_text;
|
||||
wxStaticText *next_step_text;
|
||||
wxStaticText *success_text = nullptr;
|
||||
wxStaticText *next_step_text = nullptr;
|
||||
bool sync_user_preset_need_enabled = wxGetApp().getAgent() && wxGetApp().app_config->get("sync_user_preset") == "false";
|
||||
switch (create_success_type) {
|
||||
case PRINTER:
|
||||
|
||||
Reference in New Issue
Block a user