]> www.ginac.de Git - ginac.git/commitdiff
Include crc32.h only if needed.
authorRichard Kreckel <kreckel@ginac.de>
Mon, 21 Sep 2015 21:04:20 +0000 (23:04 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 21 Sep 2015 21:04:20 +0000 (23:04 +0200)
This shuts up a compiler warning about unused static function crc32.

ginac/hash_seed.h

index 6cf65acb67269fa49a950449b1114d15331acc2e..c0fb4b8904c0c247311d35c799207474bbcff1f8 100644 (file)
@@ -7,11 +7,15 @@
 
 #include <typeinfo>
 #include <cstring>
 
 #include <typeinfo>
 #include <cstring>
-#include "crc32.h"
 #include "utils.h"
 #ifdef _WIN32
 #define GINAC_HASH_USE_MANGLED_NAME 1
 #endif
 #include "utils.h"
 #ifdef _WIN32
 #define GINAC_HASH_USE_MANGLED_NAME 1
 #endif
+
+#ifdef GINAC_HASH_USE_MANGLED_NAME
+#include "crc32.h"
+#endif
+
 namespace GiNaC
 {
 /**
 namespace GiNaC
 {
 /**
@@ -24,7 +28,7 @@ namespace GiNaC
  * the pointer returned by type_info::name() might be different even for
  * objects of the same type! Hence we need to resort to comparing string
  * representation of the (mangled) type names. This is quite expensive,
  * the pointer returned by type_info::name() might be different even for
  * objects of the same type! Hence we need to resort to comparing string
  * representation of the (mangled) type names. This is quite expensive,
- * so we compare crc32 hashes of those strings. We might got more hash
+ * so we compare crc32 hashes of those strings. We might get more hash
  * collisions (and slower evaluation as a result), but being a bit slower
  * is much better than being wrong.
  */
  * collisions (and slower evaluation as a result), but being a bit slower
  * is much better than being wrong.
  */