summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-09 19:21:42 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-09 19:21:42 +0100
commit9825dbfd34c65580d795065d1a82e7697b9c5cbd (patch)
treea112f3b17bdf16dce31a62f904e201ac58b96720
parentMerge branch 'master' into Werror (diff)
downloadcuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.gz
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.bz2
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.lz
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.xz
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.tar.zst
cuberite-9825dbfd34c65580d795065d1a82e7697b9c5cbd.zip
m---------MCServer/Plugins/Core0
-rw-r--r--src/ByteBuffer.h2
-rw-r--r--src/Defines.h2
-rw-r--r--src/Map.h2
-rw-r--r--src/MersenneTwister.h4
5 files changed, 6 insertions, 4 deletions
diff --git a/MCServer/Plugins/Core b/MCServer/Plugins/Core
-Subproject 013a32a7fb3c8a6cfe0aef892d4c7394d4e1be5
+Subproject 3b416b07a339b3abcbc127070d56eea05b05373
diff --git a/src/ByteBuffer.h b/src/ByteBuffer.h
index ed2e10a55..1915467f3 100644
--- a/src/ByteBuffer.h
+++ b/src/ByteBuffer.h
@@ -43,7 +43,7 @@ public:
size_t GetReadableSpace(void) const;
/// Returns the current data start index. For debugging purposes.
- int GetDataStart(void) const { return m_DataStart; }
+ size_t GetDataStart(void) const { return m_DataStart; }
/// Returns true if the specified amount of bytes are available for reading
bool CanReadBytes(size_t a_Count) const;
diff --git a/src/Defines.h b/src/Defines.h
index 6ab2274a4..fd240c91a 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -469,7 +469,7 @@ inline void EulerToVector(double a_Pan, double a_Pitch, double & a_X, double & a
inline void VectorToEuler(double a_X, double a_Y, double a_Z, double & a_Pan, double & a_Pitch)
{
- if (a_X != 0)
+ if (fabs(a_X) < std::numeric_limits::epsilon() )
{
a_Pan = atan2(a_Z, a_X) * 180 / PI - 90;
}
diff --git a/src/Map.h b/src/Map.h
index a313d5431..ee7c537b1 100644
--- a/src/Map.h
+++ b/src/Map.h
@@ -64,7 +64,7 @@ public:
unsigned int GetPixelX(void) const { return m_PixelX; }
unsigned int GetPixelZ(void) const { return m_PixelZ; }
- int GetRot(void) const { return m_Rot; }
+ unsigned int GetRot(void) const { return m_Rot; }
eType GetType(void) const { return m_Type; }
diff --git a/src/MersenneTwister.h b/src/MersenneTwister.h
index f4c7b0699..07b6b1e5c 100644
--- a/src/MersenneTwister.h
+++ b/src/MersenneTwister.h
@@ -59,10 +59,12 @@
#include <ctime>
#include <cmath>
+#include "Globals.h"
+
class MTRand {
// Data
public:
- typedef long uint32; // unsigned integer type, at least 32 bits
+ typedef UInt32 uint32; // unsigned integer type, at least 32 bits
enum { N = 624 }; // length of state vector
enum { SAVE = N + 1 }; // length of array for save()