aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomislav Ivek <tomislav.ivek@gmail.com>2014-10-25 21:38:27 +0200
committerTomislav Ivek <tomislav.ivek@gmail.com>2014-10-25 21:38:27 +0200
commit77be48f980f23e415381a98125944b6cbf525f4d (patch)
tree1d319724013bbcb6649ec1d8b143067f82b3d0e5
parent24f013c95c79d679de8fa7969ef7568a1192f0a7 (diff)
Do not assume integer types in global namespace
-rw-r--r--cxx11/c++11-test-cstdint.cpp8
-rw-r--r--entityx/Benchmarks_test.cc2
-rw-r--r--entityx/Entity.h2
3 files changed, 8 insertions, 4 deletions
diff --git a/cxx11/c++11-test-cstdint.cpp b/cxx11/c++11-test-cstdint.cpp
index be2878f..6ba852f 100644
--- a/cxx11/c++11-test-cstdint.cpp
+++ b/cxx11/c++11-test-cstdint.cpp
@@ -2,9 +2,9 @@
int main()
{
bool test =
- (sizeof(int8_t) == 1) &&
- (sizeof(int16_t) == 2) &&
- (sizeof(int32_t) == 4) &&
- (sizeof(int64_t) == 8);
+ (sizeof(std::int8_t) == 1) &&
+ (sizeof(std::int16_t) == 2) &&
+ (sizeof(std::int32_t) == 4) &&
+ (sizeof(std::int64_t) == 8);
return test ? 0 : 1;
}
diff --git a/entityx/Benchmarks_test.cc b/entityx/Benchmarks_test.cc
index 2cb067a..a5b3e81 100644
--- a/entityx/Benchmarks_test.cc
+++ b/entityx/Benchmarks_test.cc
@@ -9,6 +9,8 @@
using namespace std;
using namespace entityx;
+using std::uint64_t;
+
struct AutoTimer {
~AutoTimer() {
diff --git a/entityx/Entity.h b/entityx/Entity.h
index fc0abef..ef9b7be 100644
--- a/entityx/Entity.h
+++ b/entityx/Entity.h
@@ -34,6 +34,8 @@
namespace entityx {
+typedef std::uint32_t uint32_t;
+typedef std::uint64_t uint32_t;
class EntityManager;