diff --git a/applications/test/FixedList/FixedListTest.C b/applications/test/FixedList/FixedListTest.C index d82f077eae..e46e910d3a 100644 --- a/applications/test/FixedList/FixedListTest.C +++ b/applications/test/FixedList/FixedListTest.C @@ -56,6 +56,12 @@ int main(int argc, char *argv[]) Info<< "list:" << list << " hash:" << FixedList::Hash<>()(list) << endl; + Info<< "FixedList is contiguous, " + "thus hashing function is irrelevant: with string::hash" << endl; + + Info<< "list:" << list + << " hash:" << FixedList::Hash()(list) << endl; + label a[4] = {0, 1, 2, 3}; FixedList list2(a); diff --git a/applications/test/Hashing/testHashing.C b/applications/test/Hashing/testHashing.C index 109ddf28d4..248972558c 100644 --- a/applications/test/Hashing/testHashing.C +++ b/applications/test/Hashing/testHashing.C @@ -37,7 +37,7 @@ Description #include "labelList.H" #include "labelPair.H" -#include "Hashing.H" +#include "Hash.H" using namespace Foam; @@ -65,64 +65,40 @@ int main(int argc, char *argv[]) forAll(lst, i) { - unsigned hash1 = Hashing::jenkins(lst[i]); - unsigned hash2 = string::hash()(lst[i]); + unsigned hash1 = string::hash()(lst[i]); - Info<< hex << hash1 - << " (prev " << hash2 << ")" - << ": " << lst[i] << endl; + Info<< hex << hash1 << ": " << lst[i] << endl; } } else if (listType == "labelList") { - Info<<"contiguous = " << contiguous