Changed JS/TS codegen to use stable non-compiler dependent hash.

Different implementations of std::hash kept littering commits with
namespace changes.

Change-Id: Ic2d4fdcd76f8fef9802bc1572eb74ae7427085e3
This commit is contained in:
Wouter van Oortmerssen
2018-09-21 09:41:11 -07:00
parent e317b148dc
commit 4b10656f9b
2 changed files with 11 additions and 12 deletions

View File

@@ -507,8 +507,7 @@ class JsGenerator : public BaseGenerator {
}
static std::string GenFileNamespacePrefix(const std::string &file) {
return "NS" + std::to_string(static_cast<unsigned long long>(
std::hash<std::string>()(file)));
return "NS" + std::to_string(HashFnv1a<uint64_t>(file.c_str()));
}
static std::string GenPrefixedImport(const std::string &full_file_name,