third-party libs
This commit is contained in:
parent
f836927d3a
commit
b154ee9266
3667 changed files with 854591 additions and 0 deletions
36
third-party/BugTrap-1.3-57bd515/source/ColHelper.cpp
vendored
Normal file
36
third-party/BugTrap-1.3-57bd515/source/ColHelper.cpp
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* This is a part of the BugTrap package.
|
||||
* Copyright (c) 2005-2009 IntelleSoft.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Description: Implementation of collection helpers.
|
||||
* Author: Maksim Pyatkovskiy.
|
||||
*
|
||||
* This source code is only intended as a supplement to the
|
||||
* BugTrap package reference and related electronic documentation
|
||||
* provided with the product. See these sources for detailed
|
||||
* information regarding the BugTrap package.
|
||||
*/
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include "ColHelper.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Compute CRC hash value for null terminated string.
|
||||
* @param pszKey - hash value must be generated for this object.
|
||||
* @return hash value of the given object.
|
||||
*/
|
||||
unsigned GetStringHashValue(const TCHAR* pszKey)
|
||||
{
|
||||
TCHAR chCRC = 0;
|
||||
while (*pszKey)
|
||||
{
|
||||
chCRC <<= 1;
|
||||
chCRC ^= *pszKey++;
|
||||
}
|
||||
return chCRC;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue