From 52f218ee8399ae85935c66fec213145f1ff48086 Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Tue, 19 May 2020 18:18:20 +0200 Subject: Change const arrays to constexpr so that they can be used with Q_STATIC_ASSERT(). Also constify more another array. Change-Id: I1e7208127e06abb33af9bdc46712657af5dc98fe Reviewed-by: Edward Welbourne --- util/corelib/qurl-generateTLDs/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/corelib/qurl-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp index b1171f7e3b..ef61a62abf 100644 --- a/util/corelib/qurl-generateTLDs/main.cpp +++ b/util/corelib/qurl-generateTLDs/main.cpp @@ -149,8 +149,8 @@ int main(int argc, char **argv) outFile.write("// After the tldCount \"real\" entries in tldIndices, include a final entry\n"); outFile.write("// that records the sum of the lengths of all the chunks, i.e. the index\n"); outFile.write("// just past the end of tldChunks.\n"); - outFile.write("static const quint32 tldIndices[tldCount + 1] = {\n"); - outDataBuffer.write("static const char *tldData[tldChunkCount] = {"); + outFile.write("static constexpr quint32 tldIndices[tldCount + 1] = {\n"); + outDataBuffer.write("static const char * const tldData[tldChunkCount] = {"); int totalUtf8Size = 0; int chunkSize = 0; // strlen of the current chunk (sizeof is bigger by 1) @@ -197,7 +197,7 @@ int main(int argc, char **argv) // Write tldData[tldChunkCount] = {...}. outFile.write(outDataBufferBA); - outFile.write("static const quint32 tldChunks[tldChunkCount] = {"); + outFile.write("static constexpr quint32 tldChunks[tldChunkCount] = {"); outFile.write(chunks.join(", ").toLatin1()); outFile.write("};\n"); outFile.close(); -- cgit v1.2.3