summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-12-23 23:39:53 +0100
committerTiger Wang <ziwei.tiger@outlook.com>2020-12-26 17:58:53 +0100
commitd9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d (patch)
treec2763ddfe026c2121864d6ca5eae640f01133f7e /src/Defines.h
parentReplace custom ChunkCoordinate with cChunkCoords (diff)
downloadcuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.gz
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.bz2
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.lz
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.xz
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.tar.zst
cuberite-d9a7c51d4da21976ce3a8d41cde23fc9a4b6eb9d.zip
Diffstat (limited to '')
-rw-r--r--src/Defines.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/Defines.h b/src/Defines.h
index fd0d595ae..6c6eea323 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -489,7 +489,7 @@ inline void VectorToEuler(double a_X, double a_Y, double a_Z, double & a_Pan, do
-template <class T, typename = std::enable_if_t<!std::is_integral_v<T>>>
+template <class T>
inline T Diff(T a_Val1, T a_Val2)
{
return std::abs(a_Val1 - a_Val2);
@@ -499,16 +499,6 @@ inline T Diff(T a_Val1, T a_Val2)
-template <class T, typename = std::enable_if_t<std::is_integral_v<T>>>
-inline auto Diff(T a_Val1, T a_Val2)
-{
- return static_cast<std::make_unsigned_t<T>>(std::abs(a_Val1 - a_Val2));
-}
-
-
-
-
-
// tolua_begin
/** Normalizes an angle in degrees to the [-180, +180) range: */