diff --git a/Easy2D-Audio/Easy2D-Audio.vcxproj b/Easy2D-Audio/Easy2D-Audio.vcxproj index 2a78cd1b..1d177a8f 100644 --- a/Easy2D-Audio/Easy2D-Audio.vcxproj +++ b/Easy2D-Audio/Easy2D-Audio.vcxproj @@ -27,23 +27,47 @@ StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/Easy2D-ImGui/Easy2D-ImGui.vcxproj b/Easy2D-ImGui/Easy2D-ImGui.vcxproj index b6d5d279..e6dcc300 100644 --- a/Easy2D-ImGui/Easy2D-ImGui.vcxproj +++ b/Easy2D-ImGui/Easy2D-ImGui.vcxproj @@ -27,23 +27,47 @@ StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/Easy2D-Network/Easy2D-Network.vcxproj b/Easy2D-Network/Easy2D-Network.vcxproj index 9bcddadf..b4e3b3bb 100644 --- a/Easy2D-Network/Easy2D-Network.vcxproj +++ b/Easy2D-Network/Easy2D-Network.vcxproj @@ -27,23 +27,47 @@ StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/Easy2D/Easy2D.vcxproj b/Easy2D/Easy2D.vcxproj index 9d1c8a17..ee6c9a7d 100644 --- a/Easy2D/Easy2D.vcxproj +++ b/Easy2D/Easy2D.vcxproj @@ -148,23 +148,47 @@ StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 StaticLibrary false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/Easy2D/common/Json.h b/Easy2D/common/Json.h index fa77bd20..bca57b37 100644 --- a/Easy2D/common/Json.h +++ b/Easy2D/common/Json.h @@ -359,37 +359,37 @@ namespace easy2d // iterator for basic_json // - struct original_iterator + struct primitive_iterator { using difference_type = std::ptrdiff_t; - inline original_iterator(int it = 0) : it_(it) {} + inline primitive_iterator(int it = 0) : it_(it) {} inline void set_begin() { it_ = 0; } inline void set_end() { it_ = 1; } - inline original_iterator& operator++() { ++it_; return *this; } + inline primitive_iterator& operator++() { ++it_; return *this; } - inline original_iterator operator++(int) { original_iterator old(it_); ++(*this); return old; } + inline primitive_iterator operator++(int) { primitive_iterator old(it_); ++(*this); return old; } - inline original_iterator& operator--() { --it_; return (*this); } - inline original_iterator operator--(int) { original_iterator old = (*this); --(*this); return old; } + inline primitive_iterator& operator--() { --it_; return (*this); } + inline primitive_iterator operator--(int) { primitive_iterator old = (*this); --(*this); return old; } - inline bool operator==(original_iterator const& other) const { return it_ == other.it_ && it_ == other.it_; } - inline bool operator!=(original_iterator const& other) const { return !(*this == other); } + inline bool operator==(primitive_iterator const& other) const { return it_ == other.it_; } + inline bool operator!=(primitive_iterator const& other) const { return !(*this == other); } - inline const original_iterator operator+(difference_type off) const { return original_iterator(it_ + off); } - inline const original_iterator operator-(difference_type off) const { return original_iterator(it_ - off); } + inline const primitive_iterator operator+(difference_type off) const { return primitive_iterator(it_ + off); } + inline const primitive_iterator operator-(difference_type off) const { return primitive_iterator(it_ - off); } - inline original_iterator& operator+=(difference_type off) { it_ += off; return (*this); } - inline original_iterator& operator-=(difference_type off) { it_ -= off; return (*this); } + inline primitive_iterator& operator+=(difference_type off) { it_ += off; return (*this); } + inline primitive_iterator& operator-=(difference_type off) { it_ -= off; return (*this); } - inline difference_type operator-(original_iterator const& other) const { return it_ - other.it_; } + inline difference_type operator-(primitive_iterator const& other) const { return it_ - other.it_; } - inline bool operator<(original_iterator const& other) const { return it_ < other.it_; } - inline bool operator<=(original_iterator const& other) const { return it_ <= other.it_; } - inline bool operator>(original_iterator const& other) const { return it_ > other.it_; } - inline bool operator>=(original_iterator const& other) const { return it_ >= other.it_; } + inline bool operator<(primitive_iterator const& other) const { return it_ < other.it_; } + inline bool operator<=(primitive_iterator const& other) const { return it_ <= other.it_; } + inline bool operator>(primitive_iterator const& other) const { return it_ > other.it_; } + inline bool operator>=(primitive_iterator const& other) const { return it_ >= other.it_; } private: int it_; @@ -400,7 +400,7 @@ namespace easy2d { typename _BasicJsonTy::array_type::iterator array_iter; typename _BasicJsonTy::object_type::iterator object_iter; - original_iterator original_iter = 0; // for other types + primitive_iterator original_iter = 0; // for other types }; template @@ -2668,10 +2668,6 @@ namespace easy2d private: __json_detail::json_value value_; }; - -#undef E2D_DECLARE_BASIC_JSON_TEMPLATE -#undef E2D_DECLARE_BASIC_JSON_TPL_ARGS - } namespace std @@ -2691,3 +2687,6 @@ namespace std lhs.swap(rhs); } } + +#undef E2D_DECLARE_BASIC_JSON_TEMPLATE +#undef E2D_DECLARE_BASIC_JSON_TPL_ARGS diff --git a/Easy2D/common/String.h b/Easy2D/common/String.h index ed2a539a..ffd94e4c 100644 --- a/Easy2D/common/String.h +++ b/Easy2D/common/String.h @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include @@ -533,9 +535,13 @@ namespace easy2d } inline String::String(String && rhs) - : String() + : str_(rhs.str_) + , size_(rhs.size_) + , capacity_(rhs.capacity_) + , operable_(rhs.operable_) { - swap(rhs); + rhs.str_ = nullptr; + rhs.size_ = rhs.capacity_ = 0; } inline String::~String() @@ -1096,7 +1102,7 @@ namespace easy2d inline std::basic_ostream& operator<<(std::basic_ostream& os, const String & str) { - using ostream = std::basic_ostream; + using ostream = std::basic_ostream; using size_type = String::size_type; using traits = String::char_traits; @@ -1157,7 +1163,7 @@ namespace easy2d inline std::basic_istream& operator>>(std::basic_istream& is, String & str) { using ctype = std::ctype; - using istream = std::basic_istream; + using istream = std::basic_istream; using size_type = String::size_type; using traits = String::char_traits; diff --git a/samples/Box2DSample/Box2DSample.vcxproj b/samples/Box2DSample/Box2DSample.vcxproj index 3dcc0188..defb8c54 100644 --- a/samples/Box2DSample/Box2DSample.vcxproj +++ b/samples/Box2DSample/Box2DSample.vcxproj @@ -27,23 +27,47 @@ Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/samples/HelloWorld/HelloWorld.vcxproj b/samples/HelloWorld/HelloWorld.vcxproj index 717b2e38..36b5df36 100644 --- a/samples/HelloWorld/HelloWorld.vcxproj +++ b/samples/HelloWorld/HelloWorld.vcxproj @@ -27,23 +27,47 @@ Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/samples/ImGuiSample/ImGuiSample.vcxproj b/samples/ImGuiSample/ImGuiSample.vcxproj index a4ce92f5..857bdeb8 100644 --- a/samples/ImGuiSample/ImGuiSample.vcxproj +++ b/samples/ImGuiSample/ImGuiSample.vcxproj @@ -27,23 +27,47 @@ Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 diff --git a/samples/Samples/Samples.vcxproj b/samples/Samples/Samples.vcxproj index 0fbe97c3..f724679c 100644 --- a/samples/Samples/Samples.vcxproj +++ b/samples/Samples/Samples.vcxproj @@ -27,24 +27,47 @@ Application true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142 Application true Unicode - v141 + v100 + v110 + v120 + v140 + v141 + v142 Application false true Unicode + v100 + v110 + v120 + v140 + v141 + v142