Be more specific about the string hash function

This commit is contained in:
Erica Fischer
2024-02-02 11:43:06 -08:00
parent 09f225d324
commit f862d7b651
6 changed files with 2637 additions and 2670 deletions
+2 -1
View File
@@ -11,6 +11,7 @@
#include <memory>
#include "errors.hpp"
#include "text.hpp"
struct mvt_value;
struct mvt_layer;
@@ -132,7 +133,7 @@ struct std::hash<mvt_value> {
std::size_t operator()(const mvt_value &k) const {
switch (k.type) {
case mvt_string:
return std::hash<std::string_view>()(k.get_string_view());
return fnv1a(k.c_str(), 0);
case mvt_float:
return std::hash<float>()(k.numeric_value.float_value);