From 92f4aeacdeb40a91da5e057fd78ef6aa9fe2738a Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 13 Sep 2023 16:25:09 +0100 Subject: [PATCH] Fix compile error on some clangs with non-const string literals --- util/test/demos/gl/gl_overlay_test.cpp | 2 +- util/test/demos/vk/vk_overlay_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/test/demos/gl/gl_overlay_test.cpp b/util/test/demos/gl/gl_overlay_test.cpp index 52d50e423..e5005dd2a 100644 --- a/util/test/demos/gl/gl_overlay_test.cpp +++ b/util/test/demos/gl/gl_overlay_test.cpp @@ -177,7 +177,7 @@ void main() GLuint program = MakeProgram(common + vertex, common + pixel); GLuint whiteprogram = MakeProgram(common + vertex, whitepixel); - char *fmtNames[] = {"D24_S8", "D32F_S8", "D16_S0", "D24_S0", "D32F_S0"}; + const char *fmtNames[] = {"D24_S8", "D32F_S8", "D16_S0", "D24_S0", "D32F_S0"}; GLenum fmts[] = {GL_DEPTH24_STENCIL8, GL_DEPTH32F_STENCIL8, GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32F}; const size_t countFmts = ARRAY_COUNT(fmts); diff --git a/util/test/demos/vk/vk_overlay_test.cpp b/util/test/demos/vk/vk_overlay_test.cpp index acdbc8b2f..5974cf6d0 100644 --- a/util/test/demos/vk/vk_overlay_test.cpp +++ b/util/test/demos/vk/vk_overlay_test.cpp @@ -217,7 +217,7 @@ void main() std::vector supportedFmtNames; std::vector supportedFmts; { - char *possibleFmtNames[] = {"D24_S8", "D32F_S8", "D16_S0", "D24_S0", "D32F_S0"}; + const char *possibleFmtNames[] = {"D24_S8", "D32F_S8", "D16_S0", "D24_S0", "D32F_S0"}; VkFormat possibleFmts[] = {VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT, VK_FORMAT_D16_UNORM, VK_FORMAT_X8_D24_UNORM_PACK32, VK_FORMAT_D32_SFLOAT};