]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Do not assume integer types in global namespace
authorTomislav Ivek <tomislav.ivek@gmail.com>
Sat, 25 Oct 2014 19:38:27 +0000 (21:38 +0200)
committerTomislav Ivek <tomislav.ivek@gmail.com>
Sat, 25 Oct 2014 19:38:27 +0000 (21:38 +0200)
cxx11/c++11-test-cstdint.cpp
entityx/Benchmarks_test.cc
entityx/Entity.h

index be2878f2f0013d219206a59edd864059ce03bf5c..6ba852ffd0faf153a9d8b6304bb798172bf7f81b 100644 (file)
@@ -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;
 }
index 2cb067aed4ab39c412f743d0a3eb0c0be12a36ee..a5b3e812df02d0fd4ceff7a85e36086123de58d9 100644 (file)
@@ -9,6 +9,8 @@
 using namespace std;
 using namespace entityx;
 
+using std::uint64_t;
+
 
 struct AutoTimer {
   ~AutoTimer() {
index fc0abef0954306d6723ca1f308cd2e058d283906..ef9b7beeefa0717b3899f5ff480a9e713dc7df68 100644 (file)
@@ -34,6 +34,8 @@
 
 namespace entityx {
 
+typedef std::uint32_t uint32_t;
+typedef std::uint64_t uint32_t;
 
 class EntityManager;