From f9690542b2defc6a8c60e3456d47609508b72a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Ducha=C3=AEne?= <11084784+duchainer@users.noreply.github.com> Date: Wed, 18 May 2022 16:15:14 -0400 Subject: [PATCH] Cross-compiler compatibility: const -> constexpr As suggested in https://github.com/Zylann/godot_voxel/issues/387 This allowed 2 full Mac builds using these commands: ``` scons platform=osx arch=x86_64 --jobs=$(sysctl -n hw.logicalcpu) warnings=all tools=yes tests=no target=release_debug production=yes ``` ``` scons platform=osx arch=arm64 --jobs=$(sysctl -n hw.logicalcpu) warnings=all tools=yes tests=no target=release_debug production=yes voxel_fast_noise_2=false ``` - ( Also after having the VulkanSDK like mentioned here[1] and after deleting the `denoise` module which doesn't like ARM64) [1]: https://github.com/godotengine/godot/issues/57622#issuecomment-1120486153 --- meshers/blocky/voxel_blocky_model.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshers/blocky/voxel_blocky_model.h b/meshers/blocky/voxel_blocky_model.h index 78c2f832..a31a652a 100644 --- a/meshers/blocky/voxel_blocky_model.h +++ b/meshers/blocky/voxel_blocky_model.h @@ -63,7 +63,7 @@ public: }; struct Model { - static const uint32_t MAX_SURFACES = 2; + static constexpr uint32_t MAX_SURFACES = 2; // A model can have up to 2 materials. // If more is needed or profiling tells better, we could change it to a vector?