* 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.)
| ... | ... |
@@ -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 |
|
| ... | ... |
@@ -1,10 +1,11 @@ |
| 1 | 1 |
#pragma once |
| 2 | 2 |
|
| 3 |
-#include <wx/object.h> |
|
| 4 | 3 |
#include <wx/regex.h> |
| 5 | 4 |
#include <wx/string.h> |
| 6 | 5 |
#include <wx/valtext.h> |
| 7 | 6 |
|
| 7 |
+class wxObject; |
|
| 8 |
+ |
|
| 8 | 9 |
class RegExValidator : public wxTextValidator |
| 9 | 10 |
{
|
| 10 | 11 |
protected: |
| ... | ... |
@@ -12,7 +13,7 @@ protected: |
| 12 | 13 |
wxString regExString; |
| 13 | 14 |
int regExFlags; |
| 14 | 15 |
public: |
| 15 |
- RegExValidator(wxString regExpString, wxString *valPtr = nullptr, int regExpFlags = wxRE_DEFAULT); |
|
| 16 |
+ RegExValidator(const wxString ®ExpString, wxString *valPtr = nullptr, int regExpFlags = wxRE_DEFAULT); |
|
| 16 | 17 |
wxObject *Clone() const override; |
| 17 | 18 |
wxString IsValid(const wxString &str) const override; |
| 18 | 19 |
}; |
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,18 @@ |
| 1 |
+#pragma once |
|
| 2 |
+ |
|
| 3 |
+#include <wx/object.h> |
|
| 4 |
+#include <wx/regex.h> |
|
| 5 |
+#include <wx/string.h> |
|
| 6 |
+#include <wx/valtext.h> |
|
| 7 |
+ |
|
| 8 |
+class RegExValidator : public wxTextValidator |
|
| 9 |
+{
|
|
| 10 |
+protected: |
|
| 11 |
+ wxRegEx regEx; |
|
| 12 |
+ wxString regExString; |
|
| 13 |
+ int regExFlags; |
|
| 14 |
+public: |
|
| 15 |
+ RegExValidator(wxString regExpString, wxString *valPtr = nullptr, int regExpFlags = wxRE_DEFAULT); |
|
| 16 |
+ wxObject *Clone() const override; |
|
| 17 |
+ wxString IsValid(const wxString &str) const override; |
|
| 18 |
+}; |