mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-09 22:56:27 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user