/usr/include/opencollada/COLLADABaseUtils/COLLADABUHashFunctions.h is in opencollada-dev 0.1.0~20160714.0ec5063+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | /*
Copyright (c) 2008-2009 NetAllied Systems GmbH
This file is part of COLLADABaseUtils.
Licensed under the MIT Open Source License,
for details please see LICENSE file or the website
http://www.opensource.org/licenses/mit-license.php
*/
#ifndef __COLLADABU_HASHFUNCTIONS_H__
#define __COLLADABU_HASHFUNCTIONS_H__
#include "COLLADABUhash_map.h"
#include "COLLADABUURI.h"
namespace COLLADABU
{
size_t calculateHash(const String& str);
/** Converts all lower case ASCII caracters to the corresponding upper case character befor calculating the hash.*/
size_t calculateHashUpper(const String& str);
size_t calculateHash(const char* str);
/** Converts all lower case ASCII caracters to the corresponding upper case character befor calculating the hash.*/
size_t calculateHashUpper(const char* str);
size_t calculateHash(const URI& uri);
inline size_t calculateHashU(const URI& uri){
return calculateHash(uri);
}
} // namespace COLLADABU
namespace COLLADABU_HASH_NAMESPACE_OPEN
{
template<>
struct COLLADABU_HASH_FUN<COLLADABU::URI>
{
size_t operator() (const COLLADABU::URI& uri) const { return COLLADABU::calculateHash(uri); }
#if defined(_MSC_VER) && _MSC_VER==1400
static const size_t bucket_size=4;
static const size_t min_buckets=8;
bool operator() (const COLLADABU::URI& uri1, const COLLADABU::URI& uri2) const { return uri1<uri2; }
#endif
};
} COLLADABU_HASH_NAMESPACE_CLOSE
#endif // __COLLADABU_HASHFUNCTIONS_H__
|