20 #ifndef TESSERACT_TRAINING_UTIL_H_ 21 #define TESSERACT_TRAINING_UTIL_H_ 28 #ifdef USE_STD_NAMESPACE 38 const char* str = s.c_str();
39 for (
int ch = 0; str[ch] != 0; ++ch) {
40 hash_code += str[ch] << (ch % 24);
45 #else // COMPILER_MSVC 46 struct StringHash :
public stdext::hash_compare <string> {
49 const char* str = s.c_str();
50 for (
int ch = 0; str[ch] != 0; ++ch) {
51 hash_code += str[ch] << (ch % 24);
55 bool operator()(
const string& s1,
const string& s2)
const {
59 #endif // !COMPILER_MSVC 61 #ifndef USE_STD_NAMESPACE 62 #include "base/heap-checker.h" 63 #define DISABLE_HEAP_LEAK_CHECK HeapLeakChecker::Disabler disabler 65 #define DISABLE_HEAP_LEAK_CHECK {} 68 #endif // TESSERACT_TRAINING_UTIL_H_ size_t operator()(const string &s) const