summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ByteBuffer.h2
-rw-r--r--src/Defines.h2
-rw-r--r--src/Map.h2
-rw-r--r--src/MersenneTwister.h4
4 files changed, 6 insertions, 4 deletions
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()