diff options
author | peterbell10 <peterbell10@live.co.uk> | 2020-05-10 18:16:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 18:16:49 +0200 |
commit | 84289a2ba996b41815f148f27aecc52a7864066d (patch) | |
tree | 7434a6b14dde1597bd687e0a71a28135a1d31adc /src/Vector3.h | |
parent | Cleanup unneeded globals (#4736) (diff) | |
download | cuberite-84289a2ba996b41815f148f27aecc52a7864066d.tar cuberite-84289a2ba996b41815f148f27aecc52a7864066d.tar.gz cuberite-84289a2ba996b41815f148f27aecc52a7864066d.tar.bz2 cuberite-84289a2ba996b41815f148f27aecc52a7864066d.tar.lz cuberite-84289a2ba996b41815f148f27aecc52a7864066d.tar.xz cuberite-84289a2ba996b41815f148f27aecc52a7864066d.tar.zst cuberite-84289a2ba996b41815f148f27aecc52a7864066d.zip |
Diffstat (limited to 'src/Vector3.h')
-rw-r--r-- | src/Vector3.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Vector3.h b/src/Vector3.h index 4445c6336..05c9c66de 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -17,8 +17,8 @@ public: T x, y, z; - inline Vector3(void) : x(0), y(0), z(0) {} - inline Vector3(T a_x, T a_y, T a_z) : x(a_x), y(a_y), z(a_z) {} + constexpr Vector3(void) : x(0), y(0), z(0) {} + constexpr Vector3(T a_x, T a_y, T a_z) : x(a_x), y(a_y), z(a_z) {} #ifdef TOLUA_EXPOSITION // Hardcoded copy constructors (tolua++ does not support function templates .. yet) @@ -31,7 +31,12 @@ public: // tolua_end // Conversion constructors where U is not the same as T leaving the copy-constructor implicitly generated template <typename U, typename = typename std::enable_if<!std::is_same<U, T>::value>::type> - Vector3(const Vector3<U> & a_Rhs): x(static_cast<T>(a_Rhs.x)), y(static_cast<T>(a_Rhs.y)), z(static_cast<T>(a_Rhs.z)) {} + constexpr Vector3(const Vector3<U> & a_Rhs): + x(static_cast<T>(a_Rhs.x)), + y(static_cast<T>(a_Rhs.y)), + z(static_cast<T>(a_Rhs.z)) + { + } // tolua_begin inline void Set(T a_x, T a_y, T a_z) |