From 418e1cad98f11ab410de5b38e6791ec4c0ede9ac Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 1 Jan 2014 10:28:10 -0800 Subject: [PATCH] Fix some warnings when compiling with gcc --- aegisub/libaegisub/common/charset_6937.cpp | 3 +++ aegisub/src/dialog_export_ebu3264.cpp | 2 +- aegisub/src/validators.h | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aegisub/libaegisub/common/charset_6937.cpp b/aegisub/libaegisub/common/charset_6937.cpp index e85e1bbe5..e45ed4fdb 100644 --- a/aegisub/libaegisub/common/charset_6937.cpp +++ b/aegisub/libaegisub/common/charset_6937.cpp @@ -115,6 +115,8 @@ struct extended_range { const int value; }; +#ifdef _MSC_VER +// Needed for msvc's debug assertions bool operator<(extended_range const& lft, extended_range const& rgt) { return lft.codepoint < rgt.codepoint; } @@ -122,6 +124,7 @@ bool operator<(extended_range const& lft, extended_range const& rgt) { bool operator<(int lft, extended_range const& rgt) { return lft < rgt.codepoint; } +#endif bool operator<(extended_range const& lft, int rgt) { return lft.codepoint < rgt; diff --git a/aegisub/src/dialog_export_ebu3264.cpp b/aegisub/src/dialog_export_ebu3264.cpp index 4a6199a4e..4a33b43d1 100644 --- a/aegisub/src/dialog_export_ebu3264.cpp +++ b/aegisub/src/dialog_export_ebu3264.cpp @@ -92,7 +92,7 @@ namespace { public: TimecodeValidator(EbuTimecode *target) : value(target) { assert(target); } - TimecodeValidator(TimecodeValidator const& other) : value(other.value) { } + TimecodeValidator(TimecodeValidator const& other) : wxValidator(other), value(other.value) { } }; } // namespace { diff --git a/aegisub/src/validators.h b/aegisub/src/validators.h index 2839dee89..d4c5bd121 100644 --- a/aegisub/src/validators.h +++ b/aegisub/src/validators.h @@ -84,7 +84,7 @@ class EnumBinder : public wxValidator { public: explicit EnumBinder(T *value) : value(value) { } - EnumBinder(EnumBinder const& rhs) : value(rhs.value) { } + EnumBinder(EnumBinder const& rhs) : wxValidator(rhs), value(rhs.value) { } }; template