* These were mostly copied from the old Makefile.
* The files including wxWidgets need -Wno-old-style-cast done in the code via pragmas because I do not want to disable that warning for the rest of the files. (It might've been overkill for some places where wxWidgets was included, but whatever.)
| ... | ... |
@@ -66,7 +66,7 @@ set(HEADERS |
| 66 | 66 |
spu/sampledata.h |
| 67 | 67 |
XSFConfig_2SF.h |
| 68 | 68 |
XSFConfigDialog_2SF.h) |
| 69 |
-set(SOURCES |
|
| 69 |
+set(DESMUME_SOURCES |
|
| 70 | 70 |
desmume/addons/slot1_retail.cpp |
| 71 | 71 |
desmume/arm_instructions.cpp |
| 72 | 72 |
desmume/arm_jit.cpp |
| ... | ... |
@@ -112,12 +112,24 @@ set(SOURCES |
| 112 | 112 |
spu/adpcmdecoder.cpp |
| 113 | 113 |
spu/interpolator.cpp |
| 114 | 114 |
spu/samplecache.cpp |
| 115 |
- spu/sampledata.cpp |
|
| 115 |
+ spu/sampledata.cpp) |
|
| 116 |
+set(SOURCES |
|
| 117 |
+ ${DESMUME_SOURCES}
|
|
| 116 | 118 |
XSFConfig_2SF.cpp |
| 117 | 119 |
XSFConfigDialog_2SF.cpp |
| 118 | 120 |
XSFPlayer_2SF.cpp) |
| 119 | 121 |
|
| 122 |
+set(DESMUME_COMPILE_OPTIONS |
|
| 123 |
+ $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wno-shadow -Wno-unused-parameter -Wno-unused-value -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-function -Wno-implicit-fallthrough -Wno-old-style-cast -Wno-deprecated-copy |
|
| 124 |
+ -Wno-sign-compare -Wno-float-equal -Wno-missing-braces> |
|
| 125 |
+ $<$<CXX_COMPILER_ID:GNU>:-Wno-class-memaccess -Wno-unused-but-set-variable> |
|
| 126 |
+ $<$<CXX_COMPILER_ID:Clang>:-Wno-array-bounds>) |
|
| 127 |
+ |
|
| 128 |
+set_source_files_properties(${DESMUME_SOURCES} PROPERTIES
|
|
| 129 |
+ COMPILE_OPTIONS "${DESMUME_COMPILE_OPTIONS}")
|
|
| 130 |
+ |
|
| 120 | 131 |
add_library(in_2sf SHARED ${HEADERS} ${SOURCES})
|
| 132 |
+set_target_properties(in_2sf PROPERTIES PREFIX "") |
|
| 121 | 133 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
|
| 122 | 134 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
|
| 123 | 135 |
target_compile_options(in_2sf PUBLIC |
| ... | ... |
@@ -6,17 +6,29 @@ |
| 6 | 6 |
*/ |
| 7 | 7 |
|
| 8 | 8 |
#include <string> |
| 9 |
+#ifdef __GNUC__ |
|
| 10 |
+# pragma GCC diagnostic push |
|
| 11 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 12 |
+#elif defined(__clang__) |
|
| 13 |
+# pragma clang diagnostic push |
|
| 14 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 15 |
+#endif |
|
| 9 | 16 |
#include <wx/arrstr.h> |
| 10 | 17 |
#include <wx/choice.h> |
| 11 | 18 |
#include <wx/gbsizer.h> |
| 12 | 19 |
#include <wx/listbox.h> |
| 13 | 20 |
#include <wx/stattext.h> |
| 14 | 21 |
#include <wx/valgen.h> |
| 22 |
+#ifdef __GNUC__ |
|
| 23 |
+# pragma GCC diagnostic pop |
|
| 24 |
+#elif defined(__clang__) |
|
| 25 |
+# pragma clang diagnostic pop |
|
| 26 |
+#endif |
|
| 15 | 27 |
#include "XSFConfig.h" |
| 16 | 28 |
#include "XSFConfigDialog.h" |
| 17 | 29 |
#include "XSFConfigDialog_2SF.h" |
| 18 | 30 |
|
| 19 |
-XSFConfigDialog_2SF::XSFConfigDialog_2SF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title) |
|
| 31 |
+XSFConfigDialog_2SF::XSFConfigDialog_2SF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title) |
|
| 20 | 32 |
{
|
| 21 | 33 |
auto interpolationLabel = new wxStaticText(this->outputPanel, wxID_ANY, "Interpolation"); |
| 22 | 34 |
this->outputSizer->Add(interpolationLabel, { 4, 0 }, { 1, 1 }, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
| ... | ... |
@@ -7,7 +7,19 @@ |
| 7 | 7 |
|
| 8 | 8 |
#pragma once |
| 9 | 9 |
|
| 10 |
+#ifdef __GNUC__ |
|
| 11 |
+# pragma GCC diagnostic push |
|
| 12 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 13 |
+#elif defined(__clang__) |
|
| 14 |
+# pragma clang diagnostic push |
|
| 15 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 16 |
+#endif |
|
| 10 | 17 |
#include <wx/dynarray.h> |
| 18 |
+#ifdef __GNUC__ |
|
| 19 |
+# pragma GCC diagnostic pop |
|
| 20 |
+#elif defined(__clang__) |
|
| 21 |
+# pragma clang diagnostic pop |
|
| 22 |
+#endif |
|
| 11 | 23 |
#include "XSFConfigDialog.h" |
| 12 | 24 |
|
| 13 | 25 |
class wxString; |
| ... | ... |
@@ -17,7 +29,7 @@ class XSFConfig; |
| 17 | 29 |
class XSFConfigDialog_2SF : public XSFConfigDialog |
| 18 | 30 |
{
|
| 19 | 31 |
public: |
| 20 |
- XSFConfigDialog_2SF(XSFConfig &config, wxWindow *parent, const wxString &title); |
|
| 32 |
+ XSFConfigDialog_2SF(XSFConfig &newConfig, wxWindow *parent, const wxString &title); |
|
| 21 | 33 |
|
| 22 | 34 |
int interpolation; |
| 23 | 35 |
wxArrayInt mute; |
| ... | ... |
@@ -15,7 +15,7 @@ set(HEADERS |
| 15 | 15 |
vbam/gba/Sound.h |
| 16 | 16 |
XSFConfig_GSF.h |
| 17 | 17 |
XSFConfigDialog_GSF.h) |
| 18 |
-set(SOURCES |
|
| 18 |
+set(VBAM_SOURCES |
|
| 19 | 19 |
vbam/apu/Blip_Buffer.cpp |
| 20 | 20 |
vbam/apu/Gb_Apu.cpp |
| 21 | 21 |
vbam/apu/Gb_Oscs.cpp |
| ... | ... |
@@ -25,12 +25,22 @@ set(SOURCES |
| 25 | 25 |
vbam/gba/GBA-arm.cpp |
| 26 | 26 |
vbam/gba/GBA-thumb.cpp |
| 27 | 27 |
vbam/gba/Globals.cpp |
| 28 |
- vbam/gba/Sound.cpp |
|
| 28 |
+ vbam/gba/Sound.cpp) |
|
| 29 |
+set(SOURCES |
|
| 30 |
+ ${VBAM_SOURCES}
|
|
| 29 | 31 |
XSFConfig_GSF.cpp |
| 30 | 32 |
XSFConfigDialog_GSF.cpp |
| 31 | 33 |
XSFPlayer_GSF.cpp) |
| 32 | 34 |
|
| 35 |
+set(VBAM_COMPILE_OPTIONS |
|
| 36 |
+ $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wno-unused-variable -Wno-implicit-fallthrough> |
|
| 37 |
+ $<$<CXX_COMPILER_ID:GNU>:-Wno-unused-but-set-variable>) |
|
| 38 |
+ |
|
| 39 |
+set_source_files_properties(${VBAM_SOURCES} PROPERTIES
|
|
| 40 |
+ COMPILE_OPTIONS "${VBAM_COMPILE_OPTIONS}")
|
|
| 41 |
+ |
|
| 33 | 42 |
add_library(in_gsf SHARED ${HEADERS} ${SOURCES})
|
| 43 |
+set_target_properties(in_gsf PROPERTIES PREFIX "") |
|
| 34 | 44 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
|
| 35 | 45 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
|
| 36 | 46 |
target_compile_options(in_gsf PUBLIC |
| ... | ... |
@@ -5,17 +5,29 @@ |
| 5 | 5 |
* Partially based on the vio*sf framework |
| 6 | 6 |
*/ |
| 7 | 7 |
|
| 8 |
+#ifdef __GNUC__ |
|
| 9 |
+# pragma GCC diagnostic push |
|
| 10 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 11 |
+#elif defined(__clang__) |
|
| 12 |
+# pragma clang diagnostic push |
|
| 13 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 14 |
+#endif |
|
| 8 | 15 |
#include <wx/arrstr.h> |
| 9 | 16 |
#include <wx/checkbox.h> |
| 10 | 17 |
#include <wx/gbsizer.h> |
| 11 | 18 |
#include <wx/listbox.h> |
| 12 | 19 |
#include <wx/stattext.h> |
| 13 | 20 |
#include <wx/valgen.h> |
| 21 |
+#ifdef __GNUC__ |
|
| 22 |
+# pragma GCC diagnostic pop |
|
| 23 |
+#elif defined(__clang__) |
|
| 24 |
+# pragma clang diagnostic pop |
|
| 25 |
+#endif |
|
| 14 | 26 |
#include "XSFConfig.h" |
| 15 | 27 |
#include "XSFConfigDialog.h" |
| 16 | 28 |
#include "XSFConfigDialog_GSF.h" |
| 17 | 29 |
|
| 18 |
-XSFConfigDialog_GSF::XSFConfigDialog_GSF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title) |
|
| 30 |
+XSFConfigDialog_GSF::XSFConfigDialog_GSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title) |
|
| 19 | 31 |
{
|
| 20 | 32 |
auto lowPassFilteringCheckBox = new wxCheckBox(this->outputPanel, wxID_ANY, "Low-Pass Filtering", wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator{ &this->lowPassFiltering });
|
| 21 | 33 |
this->outputSizer->Add(lowPassFilteringCheckBox, { 4, 0 }, { 1, 2 }, wxALL, 5);
|
| ... | ... |
@@ -7,7 +7,19 @@ |
| 7 | 7 |
|
| 8 | 8 |
#pragma once |
| 9 | 9 |
|
| 10 |
+#ifdef __GNUC__ |
|
| 11 |
+# pragma GCC diagnostic push |
|
| 12 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 13 |
+#elif defined(__clang__) |
|
| 14 |
+# pragma clang diagnostic push |
|
| 15 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 16 |
+#endif |
|
| 10 | 17 |
#include <wx/dynarray.h> |
| 18 |
+#ifdef __GNUC__ |
|
| 19 |
+# pragma GCC diagnostic pop |
|
| 20 |
+#elif defined(__clang__) |
|
| 21 |
+# pragma clang diagnostic pop |
|
| 22 |
+#endif |
|
| 11 | 23 |
#include "XSFConfigDialog.h" |
| 12 | 24 |
|
| 13 | 25 |
class wxString; |
| ... | ... |
@@ -17,7 +29,7 @@ class XSFConfig; |
| 17 | 29 |
class XSFConfigDialog_GSF : public XSFConfigDialog |
| 18 | 30 |
{
|
| 19 | 31 |
public: |
| 20 |
- XSFConfigDialog_GSF(XSFConfig &config, wxWindow *parent, const wxString &title); |
|
| 32 |
+ XSFConfigDialog_GSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title); |
|
| 21 | 33 |
|
| 22 | 34 |
bool lowPassFiltering; |
| 23 | 35 |
wxArrayInt mute; |
| ... | ... |
@@ -39,6 +39,7 @@ set(SOURCES |
| 39 | 39 |
XSFPlayer_NCSF.cpp) |
| 40 | 40 |
|
| 41 | 41 |
add_library(in_ncsf SHARED ${HEADERS} ${RESOURCES} ${SOURCES})
|
| 42 |
+set_target_properties(in_ncsf PROPERTIES PREFIX "") |
|
| 42 | 43 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
|
| 43 | 44 |
source_group("Resource Files" FILES ${RESOURCES})
|
| 44 | 45 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
|
| ... | ... |
@@ -6,6 +6,13 @@ |
| 6 | 6 |
*/ |
| 7 | 7 |
|
| 8 | 8 |
#include <string> |
| 9 |
+#ifdef __GNUC__ |
|
| 10 |
+# pragma GCC diagnostic push |
|
| 11 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 12 |
+#elif defined(__clang__) |
|
| 13 |
+# pragma clang diagnostic push |
|
| 14 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 15 |
+#endif |
|
| 9 | 16 |
#include <wx/arrstr.h> |
| 10 | 17 |
#include <wx/checkbox.h> |
| 11 | 18 |
#include <wx/choice.h> |
| ... | ... |
@@ -13,11 +20,16 @@ |
| 13 | 20 |
#include <wx/listbox.h> |
| 14 | 21 |
#include <wx/stattext.h> |
| 15 | 22 |
#include <wx/valgen.h> |
| 23 |
+#ifdef __GNUC__ |
|
| 24 |
+# pragma GCC diagnostic pop |
|
| 25 |
+#elif defined(__clang__) |
|
| 26 |
+# pragma clang diagnostic pop |
|
| 27 |
+#endif |
|
| 16 | 28 |
#include "XSFConfig.h" |
| 17 | 29 |
#include "XSFConfigDialog.h" |
| 18 | 30 |
#include "XSFConfigDialog_NCSF.h" |
| 19 | 31 |
|
| 20 |
-XSFConfigDialog_NCSF::XSFConfigDialog_NCSF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title) |
|
| 32 |
+XSFConfigDialog_NCSF::XSFConfigDialog_NCSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title) |
|
| 21 | 33 |
{
|
| 22 | 34 |
#ifndef NDEBUG |
| 23 | 35 |
auto useSoundViewCheckBox = new wxCheckBox(this->generalPanel, wxID_ANY, "Use Sound View Window", wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator{ &this->useSoundView });
|
| ... | ... |
@@ -7,7 +7,19 @@ |
| 7 | 7 |
|
| 8 | 8 |
#pragma once |
| 9 | 9 |
|
| 10 |
+#ifdef __GNUC__ |
|
| 11 |
+# pragma GCC diagnostic push |
|
| 12 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 13 |
+#elif defined(__clang__) |
|
| 14 |
+# pragma clang diagnostic push |
|
| 15 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 16 |
+#endif |
|
| 10 | 17 |
#include <wx/dynarray.h> |
| 18 |
+#ifdef __GNUC__ |
|
| 19 |
+# pragma GCC diagnostic pop |
|
| 20 |
+#elif defined(__clang__) |
|
| 21 |
+# pragma clang diagnostic pop |
|
| 22 |
+#endif |
|
| 11 | 23 |
#include "XSFConfigDialog.h" |
| 12 | 24 |
|
| 13 | 25 |
class wxString; |
| ... | ... |
@@ -17,7 +29,7 @@ class XSFConfig; |
| 17 | 29 |
class XSFConfigDialog_NCSF : public XSFConfigDialog |
| 18 | 30 |
{
|
| 19 | 31 |
public: |
| 20 |
- XSFConfigDialog_NCSF(XSFConfig &config, wxWindow *parent, const wxString &title); |
|
| 32 |
+ XSFConfigDialog_NCSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title); |
|
| 21 | 33 |
|
| 22 | 34 |
#ifndef NDEBUG |
| 23 | 35 |
bool useSoundView; |
| ... | ... |
@@ -54,9 +54,6 @@ protected: |
| 54 | 54 |
|
| 55 | 55 |
friend class XSFConfig; |
| 56 | 56 |
friend struct SoundViewData; |
| 57 |
-#ifndef NDEBUG |
|
| 58 |
- bool useSoundViewDialog; |
|
| 59 |
-#endif |
|
| 60 | 57 |
unsigned interpolation; |
| 61 | 58 |
std::bitset<16> mutes; |
| 62 | 59 |
|
| ... | ... |
@@ -69,6 +66,7 @@ protected: |
| 69 | 66 |
void CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad) override; |
| 70 | 67 |
|
| 71 | 68 |
#ifndef NDEBUG |
| 69 |
+ bool useSoundViewDialog; |
|
| 72 | 70 |
std::unique_ptr<SoundViewData> soundViewData; |
| 73 | 71 |
|
| 74 | 72 |
static INT_PTR CALLBACK SoundViewDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); |
| ... | ... |
@@ -31,10 +31,10 @@ class XSFPlayer_NCSF : public XSFPlayer |
| 31 | 31 |
std::unique_ptr<SDAT> sdat; |
| 32 | 32 |
Player player; |
| 33 | 33 |
double secondsPerSample, secondsIntoPlayback, secondsUntilNextClock; |
| 34 |
+ std::bitset<16> mutes; |
|
| 34 | 35 |
#ifndef NDEBUG |
| 35 | 36 |
bool useSoundViewDialog; |
| 36 | 37 |
#endif |
| 37 |
- std::bitset<16> mutes; |
|
| 38 | 38 |
|
| 39 | 39 |
void MapNCSFSection(const std::vector<std::uint8_t> §ion); |
| 40 | 40 |
bool MapNCSF(XSFFile *xSFToLoad); |
| ... | ... |
@@ -26,7 +26,7 @@ set(HEADERS |
| 26 | 26 |
snes9x/snes9x.h |
| 27 | 27 |
XSFConfig_SNSF.h |
| 28 | 28 |
XSFConfigDialog_SNSF.h) |
| 29 |
-set(SOURCES |
|
| 29 |
+set(SNES9X_SOURCES |
|
| 30 | 30 |
snes9x/apu/apu.cpp |
| 31 | 31 |
snes9x/apu/SNES_SPC.cpp |
| 32 | 32 |
snes9x/apu/SNES_SPC_misc.cpp |
| ... | ... |
@@ -38,12 +38,21 @@ set(SOURCES |
| 38 | 38 |
snes9x/globals.cpp |
| 39 | 39 |
snes9x/memmap.cpp |
| 40 | 40 |
snes9x/ppu.cpp |
| 41 |
- snes9x/sdd1.cpp |
|
| 41 |
+ snes9x/sdd1.cpp) |
|
| 42 |
+set(SOURCES |
|
| 43 |
+ ${SNES9X_SOURCES}
|
|
| 42 | 44 |
XSFConfig_SNSF.cpp |
| 43 | 45 |
XSFConfigDialog_SNSF.cpp |
| 44 | 46 |
XSFPlayer_SNSF.cpp) |
| 45 | 47 |
|
| 48 |
+set(SNES9X_COMPILE_OPTIONS |
|
| 49 |
+ $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wno-implicit-fallthrough -Wno-shift-negative-value>) |
|
| 50 |
+ |
|
| 51 |
+set_source_files_properties(${SNES9X_SOURCES} PROPERTIES
|
|
| 52 |
+ COMPILE_OPTIONS "${SNES9X_COMPILE_OPTIONS}")
|
|
| 53 |
+ |
|
| 46 | 54 |
add_library(in_snsf SHARED ${HEADERS} ${SOURCES})
|
| 55 |
+set_target_properties(in_snsf PROPERTIES PREFIX "") |
|
| 47 | 56 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
|
| 48 | 57 |
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
|
| 49 | 58 |
target_compile_options(in_snsf PUBLIC |
| ... | ... |
@@ -6,6 +6,13 @@ |
| 6 | 6 |
*/ |
| 7 | 7 |
|
| 8 | 8 |
#include <string> |
| 9 |
+#ifdef __GNUC__ |
|
| 10 |
+# pragma GCC diagnostic push |
|
| 11 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 12 |
+#elif defined(__clang__) |
|
| 13 |
+# pragma clang diagnostic push |
|
| 14 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 15 |
+#endif |
|
| 9 | 16 |
#include <wx/arrstr.h> |
| 10 | 17 |
#include <wx/checkbox.h> |
| 11 | 18 |
#include <wx/choice.h> |
| ... | ... |
@@ -13,11 +20,16 @@ |
| 13 | 20 |
#include <wx/listbox.h> |
| 14 | 21 |
#include <wx/stattext.h> |
| 15 | 22 |
#include <wx/valgen.h> |
| 23 |
+#ifdef __GNUC__ |
|
| 24 |
+# pragma GCC diagnostic pop |
|
| 25 |
+#elif defined(__clang__) |
|
| 26 |
+# pragma clang diagnostic pop |
|
| 27 |
+#endif |
|
| 16 | 28 |
#include "XSFConfig.h" |
| 17 | 29 |
#include "XSFConfigDialog.h" |
| 18 | 30 |
#include "XSFConfigDialog_SNSF.h" |
| 19 | 31 |
|
| 20 |
-XSFConfigDialog_SNSF::XSFConfigDialog_SNSF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title) |
|
| 32 |
+XSFConfigDialog_SNSF::XSFConfigDialog_SNSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title) |
|
| 21 | 33 |
{
|
| 22 | 34 |
auto reverseStereoCheckBox = new wxCheckBox(this->outputPanel, wxID_ANY, "Reverse Stereo", wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator{ &this->reverseStereo });
|
| 23 | 35 |
this->outputSizer->Add(reverseStereoCheckBox, { 4, 0 }, { 1, 2 }, wxALL, 5);
|
| ... | ... |
@@ -7,7 +7,19 @@ |
| 7 | 7 |
|
| 8 | 8 |
#pragma once |
| 9 | 9 |
|
| 10 |
+#ifdef __GNUC__ |
|
| 11 |
+# pragma GCC diagnostic push |
|
| 12 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 13 |
+#elif defined(__clang__) |
|
| 14 |
+# pragma clang diagnostic push |
|
| 15 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 16 |
+#endif |
|
| 10 | 17 |
#include <wx/dynarray.h> |
| 18 |
+#ifdef __GNUC__ |
|
| 19 |
+# pragma GCC diagnostic pop |
|
| 20 |
+#elif defined(__clang__) |
|
| 21 |
+# pragma clang diagnostic pop |
|
| 22 |
+#endif |
|
| 11 | 23 |
#include "XSFConfigDialog.h" |
| 12 | 24 |
|
| 13 | 25 |
class wxString; |
| ... | ... |
@@ -17,7 +29,7 @@ class XSFConfig; |
| 17 | 29 |
class XSFConfigDialog_SNSF : public XSFConfigDialog |
| 18 | 30 |
{
|
| 19 | 31 |
public: |
| 20 |
- XSFConfigDialog_SNSF(XSFConfig &config, wxWindow *parent, const wxString &title); |
|
| 32 |
+ XSFConfigDialog_SNSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title); |
|
| 21 | 33 |
|
| 22 | 34 |
bool reverseStereo; |
| 23 | 35 |
int resampler; |
| ... | ... |
@@ -236,10 +236,13 @@ source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEAD
|
| 236 | 236 |
source_group("Source Files" ${SOURCES})
|
| 237 | 237 |
target_compile_definitions(in_xsf_framework PUBLIC |
| 238 | 238 |
_CRT_SECURE_NO_WARNINGS |
| 239 |
+ _WINDOWS |
|
| 239 | 240 |
WINAMP_PLUGIN |
| 240 | 241 |
UNICODE_INPUT_PLUGIN |
| 241 | 242 |
$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Debug>>:_ITERATOR_DEBUG_LEVEL=0>) |
| 242 | 243 |
target_compile_options(in_xsf_framework PUBLIC |
| 244 |
+ $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wall -Wctor-dtor-privacy -Wold-style-cast -Wextra -Wno-div-by-zero -Wfloat-equal -Wshadow -Winit-self -Wcast-qual -Wunreachable-code -Woverloaded-virtual -Wno-long-long -Wno-switch> |
|
| 245 |
+ $<$<CXX_COMPILER_ID:GNU>:-Wlogical-op> |
|
| 243 | 246 |
$<$<CXX_COMPILER_ID:MSVC>:/W4 /wd4244 /wd6258 /wd26451 /wd28159>) |
| 244 | 247 |
target_include_directories(in_xsf_framework PUBLIC |
| 245 | 248 |
${CMAKE_CURRENT_SOURCE_DIR}
|
| ... | ... |
@@ -1,5 +1,17 @@ |
| 1 |
+#ifdef __GNUC__ |
|
| 2 |
+# pragma GCC diagnostic push |
|
| 3 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 4 |
+#elif defined(__clang__) |
|
| 5 |
+# pragma clang diagnostic push |
|
| 6 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 7 |
+#endif |
|
| 1 | 8 |
#include <wx/object.h> |
| 2 | 9 |
#include <wx/string.h> |
| 10 |
+#ifdef __GNUC__ |
|
| 11 |
+# pragma GCC diagnostic pop |
|
| 12 |
+#elif defined(__clang__) |
|
| 13 |
+# pragma clang diagnostic pop |
|
| 14 |
+#endif |
|
| 3 | 15 |
#include "RegExValidator.h" |
| 4 | 16 |
|
| 5 | 17 |
RegExValidator::RegExValidator(const wxString ®ExpString, wxString *valPtr, int regExpFlags) : wxTextValidator(wxFILTER_EMPTY, valPtr), regEx(regExpString, regExpFlags), regExString(regExpString), regExFlags(regExpFlags) |
| ... | ... |
@@ -1,8 +1,20 @@ |
| 1 | 1 |
#pragma once |
| 2 | 2 |
|
| 3 |
+#ifdef __GNUC__ |
|
| 4 |
+# pragma GCC diagnostic push |
|
| 5 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 6 |
+#elif defined(__clang__) |
|
| 7 |
+# pragma clang diagnostic push |
|
| 8 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 9 |
+#endif |
|
| 3 | 10 |
#include <wx/regex.h> |
| 4 | 11 |
#include <wx/string.h> |
| 5 | 12 |
#include <wx/valtext.h> |
| 13 |
+#ifdef __GNUC__ |
|
| 14 |
+# pragma GCC diagnostic pop |
|
| 15 |
+#elif defined(__clang__) |
|
| 16 |
+# pragma clang diagnostic pop |
|
| 17 |
+#endif |
|
| 6 | 18 |
|
| 7 | 19 |
class wxObject; |
| 8 | 20 |
|
| ... | ... |
@@ -9,8 +9,20 @@ |
| 9 | 9 |
#include <string> |
| 10 | 10 |
#include <type_traits> |
| 11 | 11 |
#include <vector> |
| 12 |
+#ifdef __GNUC__ |
|
| 13 |
+# pragma GCC diagnostic push |
|
| 14 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 15 |
+#elif defined(__clang__) |
|
| 16 |
+# pragma clang diagnostic push |
|
| 17 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 18 |
+#endif |
|
| 12 | 19 |
#include <wx/app.h> |
| 13 | 20 |
#include <wx/nativewin.h> |
| 21 |
+#ifdef __GNUC__ |
|
| 22 |
+# pragma GCC diagnostic pop |
|
| 23 |
+#elif defined(__clang__) |
|
| 24 |
+# pragma clang diagnostic pop |
|
| 25 |
+#endif |
|
| 14 | 26 |
#include "windowsh_wrapper.h" |
| 15 | 27 |
#include <windowsx.h> |
| 16 | 28 |
#include "XSFConfig.h" |
| ... | ... |
@@ -101,7 +113,7 @@ public: |
| 101 | 113 |
{
|
| 102 | 114 |
} |
| 103 | 115 |
|
| 104 |
- XSFConfigApp(HWND parent, XSFConfig *config) : parent(parent), config(config) |
|
| 116 |
+ XSFConfigApp(HWND newParent, XSFConfig *newConfig) : parent(newParent), config(newConfig) |
|
| 105 | 117 |
{
|
| 106 | 118 |
} |
| 107 | 119 |
|
| ... | ... |
@@ -124,7 +136,19 @@ public: |
| 124 | 136 |
} |
| 125 | 137 |
}; |
| 126 | 138 |
|
| 139 |
+#ifdef __GNUC__ |
|
| 140 |
+# pragma GCC diagnostic push |
|
| 141 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 142 |
+#elif defined(__clang__) |
|
| 143 |
+# pragma clang diagnostic push |
|
| 144 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 145 |
+#endif |
|
| 127 | 146 |
wxIMPLEMENT_APP_NO_MAIN(XSFConfigApp); |
| 147 |
+#ifdef __GNUC__ |
|
| 148 |
+# pragma GCC diagnostic pop |
|
| 149 |
+#elif defined(__clang__) |
|
| 150 |
+# pragma clang diagnostic pop |
|
| 151 |
+#endif |
|
| 128 | 152 |
|
| 129 | 153 |
void XSFConfig::GenerateDialogs() |
| 130 | 154 |
{
|
| ... | ... |
@@ -6,6 +6,13 @@ |
| 6 | 6 |
*/ |
| 7 | 7 |
|
| 8 | 8 |
#include <string> |
| 9 |
+#ifdef __GNUC__ |
|
| 10 |
+# pragma GCC diagnostic push |
|
| 11 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 12 |
+#elif defined(__clang__) |
|
| 13 |
+# pragma clang diagnostic push |
|
| 14 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 15 |
+#endif |
|
| 9 | 16 |
#include <wx/button.h> |
| 10 | 17 |
#include <wx/checkbox.h> |
| 11 | 18 |
#include <wx/choice.h> |
| ... | ... |
@@ -19,6 +26,11 @@ |
| 19 | 26 |
#include <wx/valgen.h> |
| 20 | 27 |
#include <wx/valnum.h> |
| 21 | 28 |
#include <wx/window.h> |
| 29 |
+#ifdef __GNUC__ |
|
| 30 |
+# pragma GCC diagnostic pop |
|
| 31 |
+#elif defined(__clang__) |
|
| 32 |
+# pragma clang diagnostic pop |
|
| 33 |
+#endif |
|
| 22 | 34 |
#include "RegExValidator.h" |
| 23 | 35 |
#include "XSFConfig.h" |
| 24 | 36 |
#include "XSFConfigDialog.h" |
| ... | ... |
@@ -29,7 +41,7 @@ enum |
| 29 | 41 |
}; |
| 30 | 42 |
|
| 31 | 43 |
// This just sets up the base dialog box's controls, it does not do the auto-sizing at this stage. |
| 32 |
-XSFConfigDialog::XSFConfigDialog(XSFConfig &config, wxWindow *parent, const wxString &title) : wxDialog(parent, wxID_ANY, title), config(config) |
|
| 44 |
+XSFConfigDialog::XSFConfigDialog(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : wxDialog(parent, wxID_ANY, title), config(newConfig) |
|
| 33 | 45 |
{
|
| 34 | 46 |
this->mainSizer = new wxGridBagSizer; |
| 35 | 47 |
|
| ... | ... |
@@ -7,9 +7,21 @@ |
| 7 | 7 |
|
| 8 | 8 |
#pragma once |
| 9 | 9 |
|
| 10 |
+#ifdef __GNUC__ |
|
| 11 |
+# pragma GCC diagnostic push |
|
| 12 |
+# pragma GCC diagnostic ignored "-Wold-style-cast" |
|
| 13 |
+#elif defined(__clang__) |
|
| 14 |
+# pragma clang diagnostic push |
|
| 15 |
+# pragma clang diagnostic ignored "-Wold-style-cast" |
|
| 16 |
+#endif |
|
| 10 | 17 |
#include <wx/msw/winundef.h> |
| 11 | 18 |
#include <wx/dialog.h> |
| 12 | 19 |
#include <wx/string.h> |
| 20 |
+#ifdef __GNUC__ |
|
| 21 |
+# pragma GCC diagnostic pop |
|
| 22 |
+#elif defined(__clang__) |
|
| 23 |
+# pragma clang diagnostic pop |
|
| 24 |
+#endif |
|
| 13 | 25 |
|
| 14 | 26 |
class wxGridBagSizer; |
| 15 | 27 |
class wxPanel; |
| ... | ... |
@@ -23,7 +35,7 @@ class XSFConfigDialog : public wxDialog |
| 23 | 35 |
wxGridBagSizer *mainSizer; |
| 24 | 36 |
XSFConfig &config; |
| 25 | 37 |
public: |
| 26 |
- XSFConfigDialog(XSFConfig &config, wxWindow *parent, const wxString &title); |
|
| 38 |
+ XSFConfigDialog(XSFConfig &newConfig, wxWindow *parent, const wxString &title); |
|
| 27 | 39 |
void Finalize(); |
| 28 | 40 |
|
| 29 | 41 |
wxPanel *generalPanel; |