diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-08 20:50:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-02-09 09:20:17 +0100 |
commit | 90162851a79f46a0e8887e9a403b9ee4db333eb9 (patch) | |
tree | 8bc70136e480e953a1b064c8b728165058934a54 /modules | |
parent | 3cb9dc78d6001af550f125bb6f8b7da27a291add (diff) |
Core: Move generated `VERSION_HASH` to a `.cpp` file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gltf/gltf_document.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index baa39a3b80..0056fee7a4 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -57,7 +57,6 @@ #include "core/variant/typed_array.h" #include "core/variant/variant.h" #include "core/version.h" -#include "core/version_hash.gen.h" #include "drivers/png/png_driver_common.h" #include "editor/import/resource_importer_scene.h" #include "scene/2d/node_2d.h" @@ -6655,8 +6654,8 @@ Error GLTFDocument::_serialize_version(Ref<GLTFState> state) { Dictionary asset; asset["version"] = version; - String hash = VERSION_HASH; - asset["generator"] = String(VERSION_FULL_NAME) + String("@") + (hash.length() == 0 ? String("unknown") : hash); + String hash = String(VERSION_HASH); + asset["generator"] = String(VERSION_FULL_NAME) + String("@") + (hash.is_empty() ? String("unknown") : hash); state->json["asset"] = asset; ERR_FAIL_COND_V(!asset.has("version"), Error::FAILED); ERR_FAIL_COND_V(!state->json.has("asset"), Error::FAILED); |