diff --git a/direct/src/dcparser/dcFile.cxx b/direct/src/dcparser/dcFile.cxx index 7b279b418b..4b0647746f 100644 --- a/direct/src/dcparser/dcFile.cxx +++ b/direct/src/dcparser/dcFile.cxx @@ -194,7 +194,7 @@ get_class_by_name(const string &name) { // very likely to be different if the contents of the // file do change. //////////////////////////////////////////////////////////////////// -long DCFile:: +unsigned long DCFile:: get_hash() const { HashGenerator hash; generate_hash(hash); diff --git a/direct/src/dcparser/dcFile.h b/direct/src/dcparser/dcFile.h index 02185c7ff3..2cc19f283a 100644 --- a/direct/src/dcparser/dcFile.h +++ b/direct/src/dcparser/dcFile.h @@ -35,7 +35,7 @@ PUBLISHED: DCClass *get_class_by_name(const string &name); - long get_hash() const; + unsigned long get_hash() const; public: void generate_hash(HashGenerator &hash) const; diff --git a/direct/src/dcparser/dcbase.h b/direct/src/dcparser/dcbase.h index 66d21ee4d5..d3ddc34e96 100644 --- a/direct/src/dcparser/dcbase.h +++ b/direct/src/dcparser/dcbase.h @@ -34,9 +34,11 @@ #if defined(WIN32) #include #include +#include #else #include #include +#include #endif #include diff --git a/direct/src/dcparser/hashGenerator.cxx b/direct/src/dcparser/hashGenerator.cxx index d540f9777e..e35559a52d 100644 --- a/direct/src/dcparser/hashGenerator.cxx +++ b/direct/src/dcparser/hashGenerator.cxx @@ -60,7 +60,7 @@ add_string(const string &str) { // Access: Public // Description: Returns the hash number generated. //////////////////////////////////////////////////////////////////// -long HashGenerator:: +unsigned long HashGenerator:: get_hash() const { - return _hash & 0xffffffff; + return (unsigned long)(_hash & 0xffffffff); } diff --git a/direct/src/dcparser/hashGenerator.h b/direct/src/dcparser/hashGenerator.h index ea5d98255b..f2d76492e8 100644 --- a/direct/src/dcparser/hashGenerator.h +++ b/direct/src/dcparser/hashGenerator.h @@ -21,7 +21,7 @@ public: void add_int(int num); void add_string(const string &str); - long get_hash() const; + unsigned long get_hash() const; private: long _hash; diff --git a/direct/src/dcparser/primeNumberGenerator.cxx b/direct/src/dcparser/primeNumberGenerator.cxx index 957fb25ae3..c50d69517e 100644 --- a/direct/src/dcparser/primeNumberGenerator.cxx +++ b/direct/src/dcparser/primeNumberGenerator.cxx @@ -42,7 +42,7 @@ operator [] (int n) { maybe_prime = false; } j++; - nassertr(j < (int)_primes.size(), 0) + nassertr(j < (int)_primes.size(), 0); } if (maybe_prime) { // Hey, we found a prime!