File indexing completed on 2026-09-22 08:59:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _Standard_CStringHasher_HeaderFile
0015 #define _Standard_CStringHasher_HeaderFile
0016
0017 #include <Standard_CString.hxx>
0018 #include <Standard_HashUtils.hxx>
0019 #include <Standard_TypeDef.hxx>
0020
0021 class Standard_CStringHasher
0022 {
0023 public:
0024 size_t operator()(const char* const theString) const noexcept
0025 {
0026 const int aLen = static_cast<int>(strlen(theString));
0027 if (aLen < 4)
0028 {
0029 return opencascade::FNVHash::hash_combine(*theString, aLen);
0030 }
0031 return opencascade::hashBytes(theString, aLen);
0032 }
0033
0034 bool operator()(const char* const theString1, const char* const theString2) const noexcept
0035 {
0036 return strcmp(theString1, theString2) == 0;
0037 }
0038 };
0039
0040 #endif