Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

959 lines
25 KiB

  1. //===== Copyright � 1996-2009, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: inlines for compile-time hashing of constant strings
  4. //
  5. // : $
  6. //
  7. //===========================================================================//
  8. // DO NOT EDIT THIS FILE - IT IS GENERATED BY RUNNING GENERATE_CONSTRUCTORS.PL
  9. #define TOLOWERU( c ) ( ( uint32 ) ( ( ( c >= 'A' ) && ( c <= 'Z' ) )? c + 32 : c ) )
  10. FORCEINLINE CUtlStringToken( const char ( &str )[1] )
  11. {
  12. const uint32 m = 0x5bd1e995;
  13. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 0;
  14. h ^= h >> 13;
  15. h *= m;
  16. h ^= h >> 15;
  17. m_nHashCode = h;
  18. }
  19. FORCEINLINE CUtlStringToken( const char ( &str )[2] )
  20. {
  21. const uint32 m = 0x5bd1e995;
  22. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 1;
  23. h ^= TOLOWERU( str[ 0 + 0 ] );
  24. h *= m;
  25. h ^= h >> 13;
  26. h *= m;
  27. h ^= h >> 15;
  28. m_nHashCode = h;
  29. }
  30. FORCEINLINE CUtlStringToken( const char ( &str )[3] )
  31. {
  32. const uint32 m = 0x5bd1e995;
  33. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 2;
  34. h ^= TOLOWERU( str[ 0 + 1 ] ) << 8;
  35. h ^= TOLOWERU( str[ 0 + 0 ] );
  36. h *= m;
  37. h ^= h >> 13;
  38. h *= m;
  39. h ^= h >> 15;
  40. m_nHashCode = h;
  41. }
  42. FORCEINLINE CUtlStringToken( const char ( &str )[4] )
  43. {
  44. const uint32 m = 0x5bd1e995;
  45. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 3;
  46. h ^= TOLOWERU( str[ 0 + 2 ] ) << 16;
  47. h ^= TOLOWERU( str[ 0 + 1 ] ) << 8;
  48. h ^= TOLOWERU( str[ 0 + 0 ] );
  49. h *= m;
  50. h ^= h >> 13;
  51. h *= m;
  52. h ^= h >> 15;
  53. m_nHashCode = h;
  54. }
  55. FORCEINLINE CUtlStringToken( const char ( &str )[5] )
  56. {
  57. const uint32 m = 0x5bd1e995;
  58. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 4;
  59. uint32 k;
  60. const int r = 24;
  61. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  62. k *= m;
  63. k ^= k >> r;
  64. k *= m;
  65. h *= m;
  66. h ^= k;
  67. h ^= h >> 13;
  68. h *= m;
  69. h ^= h >> 15;
  70. m_nHashCode = h;
  71. }
  72. FORCEINLINE CUtlStringToken( const char ( &str )[6] )
  73. {
  74. const uint32 m = 0x5bd1e995;
  75. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 5;
  76. uint32 k;
  77. const int r = 24;
  78. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  79. k *= m;
  80. k ^= k >> r;
  81. k *= m;
  82. h *= m;
  83. h ^= k;
  84. h ^= TOLOWERU( str[ 4 + 0 ] );
  85. h *= m;
  86. h ^= h >> 13;
  87. h *= m;
  88. h ^= h >> 15;
  89. m_nHashCode = h;
  90. }
  91. FORCEINLINE CUtlStringToken( const char ( &str )[7] )
  92. {
  93. const uint32 m = 0x5bd1e995;
  94. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 6;
  95. uint32 k;
  96. const int r = 24;
  97. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  98. k *= m;
  99. k ^= k >> r;
  100. k *= m;
  101. h *= m;
  102. h ^= k;
  103. h ^= TOLOWERU( str[ 4 + 1 ] ) << 8;
  104. h ^= TOLOWERU( str[ 4 + 0 ] );
  105. h *= m;
  106. h ^= h >> 13;
  107. h *= m;
  108. h ^= h >> 15;
  109. m_nHashCode = h;
  110. }
  111. FORCEINLINE CUtlStringToken( const char ( &str )[8] )
  112. {
  113. const uint32 m = 0x5bd1e995;
  114. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 7;
  115. uint32 k;
  116. const int r = 24;
  117. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  118. k *= m;
  119. k ^= k >> r;
  120. k *= m;
  121. h *= m;
  122. h ^= k;
  123. h ^= TOLOWERU( str[ 4 + 2 ] ) << 16;
  124. h ^= TOLOWERU( str[ 4 + 1 ] ) << 8;
  125. h ^= TOLOWERU( str[ 4 + 0 ] );
  126. h *= m;
  127. h ^= h >> 13;
  128. h *= m;
  129. h ^= h >> 15;
  130. m_nHashCode = h;
  131. }
  132. FORCEINLINE CUtlStringToken( const char ( &str )[9] )
  133. {
  134. const uint32 m = 0x5bd1e995;
  135. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 8;
  136. uint32 k;
  137. const int r = 24;
  138. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  139. k *= m;
  140. k ^= k >> r;
  141. k *= m;
  142. h *= m;
  143. h ^= k;
  144. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  145. k *= m;
  146. k ^= k >> r;
  147. k *= m;
  148. h *= m;
  149. h ^= k;
  150. h ^= h >> 13;
  151. h *= m;
  152. h ^= h >> 15;
  153. m_nHashCode = h;
  154. }
  155. FORCEINLINE CUtlStringToken( const char ( &str )[10] )
  156. {
  157. const uint32 m = 0x5bd1e995;
  158. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 9;
  159. uint32 k;
  160. const int r = 24;
  161. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  162. k *= m;
  163. k ^= k >> r;
  164. k *= m;
  165. h *= m;
  166. h ^= k;
  167. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  168. k *= m;
  169. k ^= k >> r;
  170. k *= m;
  171. h *= m;
  172. h ^= k;
  173. h ^= TOLOWERU( str[ 8 + 0 ] );
  174. h *= m;
  175. h ^= h >> 13;
  176. h *= m;
  177. h ^= h >> 15;
  178. m_nHashCode = h;
  179. }
  180. FORCEINLINE CUtlStringToken( const char ( &str )[11] )
  181. {
  182. const uint32 m = 0x5bd1e995;
  183. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 10;
  184. uint32 k;
  185. const int r = 24;
  186. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  187. k *= m;
  188. k ^= k >> r;
  189. k *= m;
  190. h *= m;
  191. h ^= k;
  192. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  193. k *= m;
  194. k ^= k >> r;
  195. k *= m;
  196. h *= m;
  197. h ^= k;
  198. h ^= TOLOWERU( str[ 8 + 1 ] ) << 8;
  199. h ^= TOLOWERU( str[ 8 + 0 ] );
  200. h *= m;
  201. h ^= h >> 13;
  202. h *= m;
  203. h ^= h >> 15;
  204. m_nHashCode = h;
  205. }
  206. FORCEINLINE CUtlStringToken( const char ( &str )[12] )
  207. {
  208. const uint32 m = 0x5bd1e995;
  209. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 11;
  210. uint32 k;
  211. const int r = 24;
  212. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  213. k *= m;
  214. k ^= k >> r;
  215. k *= m;
  216. h *= m;
  217. h ^= k;
  218. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  219. k *= m;
  220. k ^= k >> r;
  221. k *= m;
  222. h *= m;
  223. h ^= k;
  224. h ^= TOLOWERU( str[ 8 + 2 ] ) << 16;
  225. h ^= TOLOWERU( str[ 8 + 1 ] ) << 8;
  226. h ^= TOLOWERU( str[ 8 + 0 ] );
  227. h *= m;
  228. h ^= h >> 13;
  229. h *= m;
  230. h ^= h >> 15;
  231. m_nHashCode = h;
  232. }
  233. FORCEINLINE CUtlStringToken( const char ( &str )[13] )
  234. {
  235. const uint32 m = 0x5bd1e995;
  236. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 12;
  237. uint32 k;
  238. const int r = 24;
  239. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  240. k *= m;
  241. k ^= k >> r;
  242. k *= m;
  243. h *= m;
  244. h ^= k;
  245. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  246. k *= m;
  247. k ^= k >> r;
  248. k *= m;
  249. h *= m;
  250. h ^= k;
  251. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  252. k *= m;
  253. k ^= k >> r;
  254. k *= m;
  255. h *= m;
  256. h ^= k;
  257. h ^= h >> 13;
  258. h *= m;
  259. h ^= h >> 15;
  260. m_nHashCode = h;
  261. }
  262. FORCEINLINE CUtlStringToken( const char ( &str )[14] )
  263. {
  264. const uint32 m = 0x5bd1e995;
  265. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 13;
  266. uint32 k;
  267. const int r = 24;
  268. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  269. k *= m;
  270. k ^= k >> r;
  271. k *= m;
  272. h *= m;
  273. h ^= k;
  274. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  275. k *= m;
  276. k ^= k >> r;
  277. k *= m;
  278. h *= m;
  279. h ^= k;
  280. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  281. k *= m;
  282. k ^= k >> r;
  283. k *= m;
  284. h *= m;
  285. h ^= k;
  286. h ^= TOLOWERU( str[ 12 + 0 ] );
  287. h *= m;
  288. h ^= h >> 13;
  289. h *= m;
  290. h ^= h >> 15;
  291. m_nHashCode = h;
  292. }
  293. FORCEINLINE CUtlStringToken( const char ( &str )[15] )
  294. {
  295. const uint32 m = 0x5bd1e995;
  296. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 14;
  297. uint32 k;
  298. const int r = 24;
  299. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  300. k *= m;
  301. k ^= k >> r;
  302. k *= m;
  303. h *= m;
  304. h ^= k;
  305. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  306. k *= m;
  307. k ^= k >> r;
  308. k *= m;
  309. h *= m;
  310. h ^= k;
  311. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  312. k *= m;
  313. k ^= k >> r;
  314. k *= m;
  315. h *= m;
  316. h ^= k;
  317. h ^= TOLOWERU( str[ 12 + 1 ] ) << 8;
  318. h ^= TOLOWERU( str[ 12 + 0 ] );
  319. h *= m;
  320. h ^= h >> 13;
  321. h *= m;
  322. h ^= h >> 15;
  323. m_nHashCode = h;
  324. }
  325. FORCEINLINE CUtlStringToken( const char ( &str )[16] )
  326. {
  327. const uint32 m = 0x5bd1e995;
  328. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 15;
  329. uint32 k;
  330. const int r = 24;
  331. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  332. k *= m;
  333. k ^= k >> r;
  334. k *= m;
  335. h *= m;
  336. h ^= k;
  337. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  338. k *= m;
  339. k ^= k >> r;
  340. k *= m;
  341. h *= m;
  342. h ^= k;
  343. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  344. k *= m;
  345. k ^= k >> r;
  346. k *= m;
  347. h *= m;
  348. h ^= k;
  349. h ^= TOLOWERU( str[ 12 + 2 ] ) << 16;
  350. h ^= TOLOWERU( str[ 12 + 1 ] ) << 8;
  351. h ^= TOLOWERU( str[ 12 + 0 ] );
  352. h *= m;
  353. h ^= h >> 13;
  354. h *= m;
  355. h ^= h >> 15;
  356. m_nHashCode = h;
  357. }
  358. FORCEINLINE CUtlStringToken( const char ( &str )[17] )
  359. {
  360. const uint32 m = 0x5bd1e995;
  361. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 16;
  362. uint32 k;
  363. const int r = 24;
  364. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  365. k *= m;
  366. k ^= k >> r;
  367. k *= m;
  368. h *= m;
  369. h ^= k;
  370. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  371. k *= m;
  372. k ^= k >> r;
  373. k *= m;
  374. h *= m;
  375. h ^= k;
  376. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  377. k *= m;
  378. k ^= k >> r;
  379. k *= m;
  380. h *= m;
  381. h ^= k;
  382. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  383. k *= m;
  384. k ^= k >> r;
  385. k *= m;
  386. h *= m;
  387. h ^= k;
  388. h ^= h >> 13;
  389. h *= m;
  390. h ^= h >> 15;
  391. m_nHashCode = h;
  392. }
  393. FORCEINLINE CUtlStringToken( const char ( &str )[18] )
  394. {
  395. const uint32 m = 0x5bd1e995;
  396. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 17;
  397. uint32 k;
  398. const int r = 24;
  399. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  400. k *= m;
  401. k ^= k >> r;
  402. k *= m;
  403. h *= m;
  404. h ^= k;
  405. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  406. k *= m;
  407. k ^= k >> r;
  408. k *= m;
  409. h *= m;
  410. h ^= k;
  411. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  412. k *= m;
  413. k ^= k >> r;
  414. k *= m;
  415. h *= m;
  416. h ^= k;
  417. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  418. k *= m;
  419. k ^= k >> r;
  420. k *= m;
  421. h *= m;
  422. h ^= k;
  423. h ^= TOLOWERU( str[ 16 + 0 ] );
  424. h *= m;
  425. h ^= h >> 13;
  426. h *= m;
  427. h ^= h >> 15;
  428. m_nHashCode = h;
  429. }
  430. FORCEINLINE CUtlStringToken( const char ( &str )[19] )
  431. {
  432. const uint32 m = 0x5bd1e995;
  433. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 18;
  434. uint32 k;
  435. const int r = 24;
  436. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  437. k *= m;
  438. k ^= k >> r;
  439. k *= m;
  440. h *= m;
  441. h ^= k;
  442. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  443. k *= m;
  444. k ^= k >> r;
  445. k *= m;
  446. h *= m;
  447. h ^= k;
  448. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  449. k *= m;
  450. k ^= k >> r;
  451. k *= m;
  452. h *= m;
  453. h ^= k;
  454. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  455. k *= m;
  456. k ^= k >> r;
  457. k *= m;
  458. h *= m;
  459. h ^= k;
  460. h ^= TOLOWERU( str[ 16 + 1 ] ) << 8;
  461. h ^= TOLOWERU( str[ 16 + 0 ] );
  462. h *= m;
  463. h ^= h >> 13;
  464. h *= m;
  465. h ^= h >> 15;
  466. m_nHashCode = h;
  467. }
  468. FORCEINLINE CUtlStringToken( const char ( &str )[20] )
  469. {
  470. const uint32 m = 0x5bd1e995;
  471. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 19;
  472. uint32 k;
  473. const int r = 24;
  474. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  475. k *= m;
  476. k ^= k >> r;
  477. k *= m;
  478. h *= m;
  479. h ^= k;
  480. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  481. k *= m;
  482. k ^= k >> r;
  483. k *= m;
  484. h *= m;
  485. h ^= k;
  486. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  487. k *= m;
  488. k ^= k >> r;
  489. k *= m;
  490. h *= m;
  491. h ^= k;
  492. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  493. k *= m;
  494. k ^= k >> r;
  495. k *= m;
  496. h *= m;
  497. h ^= k;
  498. h ^= TOLOWERU( str[ 16 + 2 ] ) << 16;
  499. h ^= TOLOWERU( str[ 16 + 1 ] ) << 8;
  500. h ^= TOLOWERU( str[ 16 + 0 ] );
  501. h *= m;
  502. h ^= h >> 13;
  503. h *= m;
  504. h ^= h >> 15;
  505. m_nHashCode = h;
  506. }
  507. FORCEINLINE CUtlStringToken( const char ( &str )[21] )
  508. {
  509. const uint32 m = 0x5bd1e995;
  510. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 20;
  511. uint32 k;
  512. const int r = 24;
  513. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  514. k *= m;
  515. k ^= k >> r;
  516. k *= m;
  517. h *= m;
  518. h ^= k;
  519. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  520. k *= m;
  521. k ^= k >> r;
  522. k *= m;
  523. h *= m;
  524. h ^= k;
  525. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  526. k *= m;
  527. k ^= k >> r;
  528. k *= m;
  529. h *= m;
  530. h ^= k;
  531. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  532. k *= m;
  533. k ^= k >> r;
  534. k *= m;
  535. h *= m;
  536. h ^= k;
  537. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  538. k *= m;
  539. k ^= k >> r;
  540. k *= m;
  541. h *= m;
  542. h ^= k;
  543. h ^= h >> 13;
  544. h *= m;
  545. h ^= h >> 15;
  546. m_nHashCode = h;
  547. }
  548. FORCEINLINE CUtlStringToken( const char ( &str )[22] )
  549. {
  550. const uint32 m = 0x5bd1e995;
  551. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 21;
  552. uint32 k;
  553. const int r = 24;
  554. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  555. k *= m;
  556. k ^= k >> r;
  557. k *= m;
  558. h *= m;
  559. h ^= k;
  560. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  561. k *= m;
  562. k ^= k >> r;
  563. k *= m;
  564. h *= m;
  565. h ^= k;
  566. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  567. k *= m;
  568. k ^= k >> r;
  569. k *= m;
  570. h *= m;
  571. h ^= k;
  572. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  573. k *= m;
  574. k ^= k >> r;
  575. k *= m;
  576. h *= m;
  577. h ^= k;
  578. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  579. k *= m;
  580. k ^= k >> r;
  581. k *= m;
  582. h *= m;
  583. h ^= k;
  584. h ^= TOLOWERU( str[ 20 + 0 ] );
  585. h *= m;
  586. h ^= h >> 13;
  587. h *= m;
  588. h ^= h >> 15;
  589. m_nHashCode = h;
  590. }
  591. FORCEINLINE CUtlStringToken( const char ( &str )[23] )
  592. {
  593. const uint32 m = 0x5bd1e995;
  594. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 22;
  595. uint32 k;
  596. const int r = 24;
  597. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  598. k *= m;
  599. k ^= k >> r;
  600. k *= m;
  601. h *= m;
  602. h ^= k;
  603. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  604. k *= m;
  605. k ^= k >> r;
  606. k *= m;
  607. h *= m;
  608. h ^= k;
  609. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  610. k *= m;
  611. k ^= k >> r;
  612. k *= m;
  613. h *= m;
  614. h ^= k;
  615. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  616. k *= m;
  617. k ^= k >> r;
  618. k *= m;
  619. h *= m;
  620. h ^= k;
  621. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  622. k *= m;
  623. k ^= k >> r;
  624. k *= m;
  625. h *= m;
  626. h ^= k;
  627. h ^= TOLOWERU( str[ 20 + 1 ] ) << 8;
  628. h ^= TOLOWERU( str[ 20 + 0 ] );
  629. h *= m;
  630. h ^= h >> 13;
  631. h *= m;
  632. h ^= h >> 15;
  633. m_nHashCode = h;
  634. }
  635. FORCEINLINE CUtlStringToken( const char ( &str )[24] )
  636. {
  637. const uint32 m = 0x5bd1e995;
  638. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 23;
  639. uint32 k;
  640. const int r = 24;
  641. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  642. k *= m;
  643. k ^= k >> r;
  644. k *= m;
  645. h *= m;
  646. h ^= k;
  647. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  648. k *= m;
  649. k ^= k >> r;
  650. k *= m;
  651. h *= m;
  652. h ^= k;
  653. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  654. k *= m;
  655. k ^= k >> r;
  656. k *= m;
  657. h *= m;
  658. h ^= k;
  659. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  660. k *= m;
  661. k ^= k >> r;
  662. k *= m;
  663. h *= m;
  664. h ^= k;
  665. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  666. k *= m;
  667. k ^= k >> r;
  668. k *= m;
  669. h *= m;
  670. h ^= k;
  671. h ^= TOLOWERU( str[ 20 + 2 ] ) << 16;
  672. h ^= TOLOWERU( str[ 20 + 1 ] ) << 8;
  673. h ^= TOLOWERU( str[ 20 + 0 ] );
  674. h *= m;
  675. h ^= h >> 13;
  676. h *= m;
  677. h ^= h >> 15;
  678. m_nHashCode = h;
  679. }
  680. FORCEINLINE CUtlStringToken( const char ( &str )[25] )
  681. {
  682. const uint32 m = 0x5bd1e995;
  683. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 24;
  684. uint32 k;
  685. const int r = 24;
  686. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  687. k *= m;
  688. k ^= k >> r;
  689. k *= m;
  690. h *= m;
  691. h ^= k;
  692. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  693. k *= m;
  694. k ^= k >> r;
  695. k *= m;
  696. h *= m;
  697. h ^= k;
  698. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  699. k *= m;
  700. k ^= k >> r;
  701. k *= m;
  702. h *= m;
  703. h ^= k;
  704. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  705. k *= m;
  706. k ^= k >> r;
  707. k *= m;
  708. h *= m;
  709. h ^= k;
  710. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  711. k *= m;
  712. k ^= k >> r;
  713. k *= m;
  714. h *= m;
  715. h ^= k;
  716. k = TOLOWERU( str[ 20 ] ) + ( TOLOWERU( str[ 20 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 20 + 2 ] ) << 16 ) +( TOLOWERU( str[ 20 + 3 ] ) << 24 );
  717. k *= m;
  718. k ^= k >> r;
  719. k *= m;
  720. h *= m;
  721. h ^= k;
  722. h ^= h >> 13;
  723. h *= m;
  724. h ^= h >> 15;
  725. m_nHashCode = h;
  726. }
  727. FORCEINLINE CUtlStringToken( const char ( &str )[26] )
  728. {
  729. const uint32 m = 0x5bd1e995;
  730. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 25;
  731. uint32 k;
  732. const int r = 24;
  733. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  734. k *= m;
  735. k ^= k >> r;
  736. k *= m;
  737. h *= m;
  738. h ^= k;
  739. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  740. k *= m;
  741. k ^= k >> r;
  742. k *= m;
  743. h *= m;
  744. h ^= k;
  745. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  746. k *= m;
  747. k ^= k >> r;
  748. k *= m;
  749. h *= m;
  750. h ^= k;
  751. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  752. k *= m;
  753. k ^= k >> r;
  754. k *= m;
  755. h *= m;
  756. h ^= k;
  757. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  758. k *= m;
  759. k ^= k >> r;
  760. k *= m;
  761. h *= m;
  762. h ^= k;
  763. k = TOLOWERU( str[ 20 ] ) + ( TOLOWERU( str[ 20 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 20 + 2 ] ) << 16 ) +( TOLOWERU( str[ 20 + 3 ] ) << 24 );
  764. k *= m;
  765. k ^= k >> r;
  766. k *= m;
  767. h *= m;
  768. h ^= k;
  769. h ^= TOLOWERU( str[ 24 + 0 ] );
  770. h *= m;
  771. h ^= h >> 13;
  772. h *= m;
  773. h ^= h >> 15;
  774. m_nHashCode = h;
  775. }
  776. FORCEINLINE CUtlStringToken( const char ( &str )[27] )
  777. {
  778. const uint32 m = 0x5bd1e995;
  779. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 26;
  780. uint32 k;
  781. const int r = 24;
  782. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  783. k *= m;
  784. k ^= k >> r;
  785. k *= m;
  786. h *= m;
  787. h ^= k;
  788. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  789. k *= m;
  790. k ^= k >> r;
  791. k *= m;
  792. h *= m;
  793. h ^= k;
  794. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  795. k *= m;
  796. k ^= k >> r;
  797. k *= m;
  798. h *= m;
  799. h ^= k;
  800. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  801. k *= m;
  802. k ^= k >> r;
  803. k *= m;
  804. h *= m;
  805. h ^= k;
  806. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  807. k *= m;
  808. k ^= k >> r;
  809. k *= m;
  810. h *= m;
  811. h ^= k;
  812. k = TOLOWERU( str[ 20 ] ) + ( TOLOWERU( str[ 20 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 20 + 2 ] ) << 16 ) +( TOLOWERU( str[ 20 + 3 ] ) << 24 );
  813. k *= m;
  814. k ^= k >> r;
  815. k *= m;
  816. h *= m;
  817. h ^= k;
  818. h ^= TOLOWERU( str[ 24 + 1 ] ) << 8;
  819. h ^= TOLOWERU( str[ 24 + 0 ] );
  820. h *= m;
  821. h ^= h >> 13;
  822. h *= m;
  823. h ^= h >> 15;
  824. m_nHashCode = h;
  825. }
  826. FORCEINLINE CUtlStringToken( const char ( &str )[28] )
  827. {
  828. const uint32 m = 0x5bd1e995;
  829. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 27;
  830. uint32 k;
  831. const int r = 24;
  832. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  833. k *= m;
  834. k ^= k >> r;
  835. k *= m;
  836. h *= m;
  837. h ^= k;
  838. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  839. k *= m;
  840. k ^= k >> r;
  841. k *= m;
  842. h *= m;
  843. h ^= k;
  844. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  845. k *= m;
  846. k ^= k >> r;
  847. k *= m;
  848. h *= m;
  849. h ^= k;
  850. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  851. k *= m;
  852. k ^= k >> r;
  853. k *= m;
  854. h *= m;
  855. h ^= k;
  856. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  857. k *= m;
  858. k ^= k >> r;
  859. k *= m;
  860. h *= m;
  861. h ^= k;
  862. k = TOLOWERU( str[ 20 ] ) + ( TOLOWERU( str[ 20 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 20 + 2 ] ) << 16 ) +( TOLOWERU( str[ 20 + 3 ] ) << 24 );
  863. k *= m;
  864. k ^= k >> r;
  865. k *= m;
  866. h *= m;
  867. h ^= k;
  868. h ^= TOLOWERU( str[ 24 + 2 ] ) << 16;
  869. h ^= TOLOWERU( str[ 24 + 1 ] ) << 8;
  870. h ^= TOLOWERU( str[ 24 + 0 ] );
  871. h *= m;
  872. h ^= h >> 13;
  873. h *= m;
  874. h ^= h >> 15;
  875. m_nHashCode = h;
  876. }
  877. FORCEINLINE CUtlStringToken( const char ( &str )[29] )
  878. {
  879. const uint32 m = 0x5bd1e995;
  880. uint32 h = STRINGTOKEN_MURMURHASH_SEED ^ 28;
  881. uint32 k;
  882. const int r = 24;
  883. k = TOLOWERU( str[ 0 ] ) + ( TOLOWERU( str[ 0 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 0 + 2 ] ) << 16 ) +( TOLOWERU( str[ 0 + 3 ] ) << 24 );
  884. k *= m;
  885. k ^= k >> r;
  886. k *= m;
  887. h *= m;
  888. h ^= k;
  889. k = TOLOWERU( str[ 4 ] ) + ( TOLOWERU( str[ 4 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 4 + 2 ] ) << 16 ) +( TOLOWERU( str[ 4 + 3 ] ) << 24 );
  890. k *= m;
  891. k ^= k >> r;
  892. k *= m;
  893. h *= m;
  894. h ^= k;
  895. k = TOLOWERU( str[ 8 ] ) + ( TOLOWERU( str[ 8 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 8 + 2 ] ) << 16 ) +( TOLOWERU( str[ 8 + 3 ] ) << 24 );
  896. k *= m;
  897. k ^= k >> r;
  898. k *= m;
  899. h *= m;
  900. h ^= k;
  901. k = TOLOWERU( str[ 12 ] ) + ( TOLOWERU( str[ 12 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 12 + 2 ] ) << 16 ) +( TOLOWERU( str[ 12 + 3 ] ) << 24 );
  902. k *= m;
  903. k ^= k >> r;
  904. k *= m;
  905. h *= m;
  906. h ^= k;
  907. k = TOLOWERU( str[ 16 ] ) + ( TOLOWERU( str[ 16 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 16 + 2 ] ) << 16 ) +( TOLOWERU( str[ 16 + 3 ] ) << 24 );
  908. k *= m;
  909. k ^= k >> r;
  910. k *= m;
  911. h *= m;
  912. h ^= k;
  913. k = TOLOWERU( str[ 20 ] ) + ( TOLOWERU( str[ 20 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 20 + 2 ] ) << 16 ) +( TOLOWERU( str[ 20 + 3 ] ) << 24 );
  914. k *= m;
  915. k ^= k >> r;
  916. k *= m;
  917. h *= m;
  918. h ^= k;
  919. k = TOLOWERU( str[ 24 ] ) + ( TOLOWERU( str[ 24 + 1 ] ) << 8 ) + ( TOLOWERU( str[ 24 + 2 ] ) << 16 ) +( TOLOWERU( str[ 24 + 3 ] ) << 24 );
  920. k *= m;
  921. k ^= k >> r;
  922. k *= m;
  923. h *= m;
  924. h ^= k;
  925. h ^= h >> 13;
  926. h *= m;
  927. h ^= h >> 15;
  928. m_nHashCode = h;
  929. }