diff options
author | Dimitrios Apostolou <jimis@qt.io> | 2020-05-19 18:18:20 +0200 |
---|---|---|
committer | Dimitrios Apostolou <jimis@qt.io> | 2020-05-28 10:48:58 +0200 |
commit | 52f218ee8399ae85935c66fec213145f1ff48086 (patch) | |
tree | fa8ea74d2a3b2a9c89dc88689e7e6ea093e8504e /util | |
parent | fa81b3ebe2611a67e21f58679af906862479b92f (diff) |
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 <edward.welbourne@qt.io>
Diffstat (limited to 'util')
-rw-r--r-- | util/corelib/qurl-generateTLDs/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |