Fix Compile Warnings (#5963)

* Fix calls to depreciated wxPen constructor

* Fix use of wxTimerEvent

* Fix unrecognized character escape sequence

* Fix signed/unsigned mismatch

At least as much as possible without significantly altering parts of the application

* Clean unreferenced variables

* fix mistyped namespace selector

* Update deprecated calls

* Fix preprocessor statement

* Remove empty switch statements

* Change int vector used as bool to bool vector

* Remove empty control statements and related unused code

* Change multi character constant to string constant

* Fix discarded return value

json::parse was being called on the object, rather than statically like it should be. Also, the value was not being captured.

* Rename ICON_SIZE def used by MultiMachine

By having the definition in the header, it causes issues when other files define ICON_SIZE. By renaming it to MM_ICON_SIZE, this lessens the issue. It would probably be ideal to have the definitions in the respective .cpp that use them, but it would make it less convenient to update the values if needed in the future.

* Remove unused includes

* Fix linux/macOS compilation

* Hide unused-function errors on non-Windows systems

* Disable signed/unsigned comparison mismatch error

* Remove/Disable more unused variables

Still TODO: check double for loop in Print.cpp

* Remove unused variable that was missed

* Remove unused variables in libraries in the src folder

* Apply temporary fix for subobject linkage error

* Remove/Disable last set of unused variables reported by GCC

* remove redundant for loop

* fix misspelled ifdef check

* Update message on dialog

* Fix hard-coded platform specific modifier keys

* Remove duplicate for loop

* Disable -Wmisleading-indentation warning

* disable -Wswitch warning

* Remove unused local typedefs

* Fix -Wunused-value

* Fix pragma error on Windows from subobject linkage fix

* Fix -Waddress

* Fix null conversions (-Wconversion-null)

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Ocraftyone 2024-07-29 09:00:26 -04:00 committed by GitHub
parent b40853af94
commit b83e16dbdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
187 changed files with 494 additions and 1101 deletions

View file

@ -183,11 +183,7 @@ void KBShortcutsDialog::fill_shortcuts()
// Slice plate
{ ctrl + "R", L("Slice plate")},
// Send to Print
#ifdef __APPLE__
{ L("⌘+Shift+G"), L("Print plate")},
#else
{ L("Ctrl+Shift+G"), L("Print plate")},
#endif // __APPLE
{ ctrl + L("Shift+G"), L("Print plate")},
// Edit
{ ctrl + "X", L("Cut") },
@ -226,16 +222,9 @@ void KBShortcutsDialog::fill_shortcuts()
{L("Shift+R"), L("Auto orientates selected objects or all objects.If there are selected objects, it just orientates the selected ones.Otherwise, it will orientates all objects in the current disk.")},
{L("Shift+Tab"), L("Collapse/Expand the sidebar")},
#ifdef __APPLE__
{L("⌘+Any arrow"), L("Movement in camera space")},
{L("⌥+Left mouse button"), L("Select a part")},
{L("⌘+Left mouse button"), L("Select multiple objects")},
#else
{L("Ctrl+Any arrow"), L("Movement in camera space")},
{L("Alt+Left mouse button"), L("Select a part")},
{L("Ctrl+Left mouse button"), L("Select multiple objects")},
#endif
{ ctrl + L("Any arrow"), L("Movement in camera space")},
{ alt + L("Left mouse button"), L("Select a part")},
{ ctrl + L("Left mouse button"), L("Select multiple objects")},
{L("Shift+Left mouse button"), L("Select objects by rectangle")},
{L("Arrow Up"), L("Move selection 10 mm in positive Y direction")},
{L("Arrow Down"), L("Move selection 10 mm in negative Y direction")},
@ -274,13 +263,8 @@ void KBShortcutsDialog::fill_shortcuts()
Shortcuts gizmos_shortcuts = {
{L("Esc"), L("Deselect all")},
{L("Shift+"), L("Move: press to snap by 1mm")},
#ifdef __APPLE__
{L("⌘+Mouse wheel"), L("Support/Color Painting: adjust pen radius")},
{L("⌥+Mouse wheel"), L("Support/Color Painting: adjust section position")},
#else
{L("Ctrl+Mouse wheel"), L("Support/Color Painting: adjust pen radius")},
{L("Alt+Mouse wheel"), L("Support/Color Painting: adjust section position")},
#endif
{ ctrl + L("Mouse wheel"), L("Support/Color Painting: adjust pen radius")},
{ alt + L("Mouse wheel"), L("Support/Color Painting: adjust section position")},
};
m_full_shortcuts.push_back({{_L("Gizmo"), ""}, gizmos_shortcuts});
@ -311,13 +295,8 @@ void KBShortcutsDialog::fill_shortcuts()
{ "Tab", L("Switch between Prepare/Preview") },
{L("Shift+Any arrow"), L("Move slider 5x faster")},
{L("Shift+Mouse wheel"), L("Move slider 5x faster")},
#ifdef __APPLE__
{L("⌘+Any arrow"), L("Move slider 5x faster")},
{L("⌘+Mouse wheel"), L("Move slider 5x faster")},
#else
{L("Ctrl+Any arrow"), L("Move slider 5x faster")},
{L("Ctrl+Mouse wheel"), L("Move slider 5x faster")},
#endif
{ ctrl + L("Any arrow"), L("Move slider 5x faster")},
{ ctrl + L("Mouse wheel"), L("Move slider 5x faster")},
{ L("Home"), L("Horizontal slider - Move to start position")},
{ L("End"), L("Horizontal slider - Move to last position")},
};