diff --git a/src/core/IntrusivePtr.hpp b/src/core/IntrusivePtr.hpp index 11b78b1c..004c5ec6 100644 --- a/src/core/IntrusivePtr.hpp +++ b/src/core/IntrusivePtr.hpp @@ -67,6 +67,11 @@ namespace easy2d inline Type* Get() const E2D_NOEXCEPT { return ptr_; } + inline void Reset() E2D_NOEXCEPT + { + IntrusivePtr{}.Swap(*this); + } + inline void Swap(IntrusivePtr& other) E2D_NOEXCEPT { std::swap(ptr_, other.ptr_); diff --git a/src/math/scalar.hpp b/src/math/scalar.hpp index d32eb8ba..1d6ec463 100644 --- a/src/math/scalar.hpp +++ b/src/math/scalar.hpp @@ -22,12 +22,6 @@ #include "constants.hpp" #include -#if _MSC_VER >= 1900 -# define E2D_CONSTEXPR constexpr -#else -# define E2D_CONSTEXPR const -#endif - namespace easy2d {