From 8642d71e891134c9e59f578277c7288df5ed3727 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 24 Aug 2019 18:58:47 -0400 Subject: [PATCH] D3D11: Convert const char* pointers to arrays Reduces binary size a little, as only the string data will be stored in the executable and not a pointer to accompany it as well. A trivial change that's essentially "free". --- lib/graphicsdev/D3D11.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphicsdev/D3D11.cpp b/lib/graphicsdev/D3D11.cpp index 18bcc6a..d06bda7 100644 --- a/lib/graphicsdev/D3D11.cpp +++ b/lib/graphicsdev/D3D11.cpp @@ -24,7 +24,7 @@ extern pD3DCompile D3DCompilePROC; extern pD3DPERF_BeginEvent D3DPERF_BeginEventPROC; extern pD3DPERF_EndEvent D3DPERF_EndEventPROC; -static const char* GammaVS = +constexpr char GammaVS[] = "struct VertData\n" "{\n" " float4 posIn : POSITION;\n" @@ -45,7 +45,7 @@ static const char* GammaVS = " return vtf;\n" "}\n"; -static const char* GammaFS = +constexpr char GammaFS[] = "struct VertToFrag\n" "{\n" " float4 pos : SV_Position;\n"