From 00ea70b840b965db6f666ba666d631d34eefda8f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 18 Jun 2022 12:04:53 -0700 Subject: [PATCH] moc: rename the "offsetsAndSize" member to "offsetsAndSizes" It contains more than one size. Drive-by drop the const from the structure, so it becomes properly trivial (though there's disagreement, see[1]). [1] https://conformance.godbolt.org/z/rK1xW669K Change-Id: Id0fb9ab0089845ee8843fffd16f9cc69ffd90aa4 Reviewed-by: Marc Mutz (cherry picked from commit 3cf38290d9c459ecdbde9d6eb4dee09fc94f29a4) Reviewed-by: Qt Cherry-pick Bot --- src/tools/moc/generator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 3d633debd22..aab6b74e63f 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -220,7 +220,7 @@ void Generator::generateCode() // const int constCharArraySizeLimit = 65535; fprintf(out, "struct qt_meta_stringdata_%s_t {\n", qualifiedClassNameIdentifier.constData()); - fprintf(out, " const uint offsetsAndSize[%d];\n", int(strings.size()*2)); + fprintf(out, " uint offsetsAndSizes[%d];\n", int(strings.size() * 2)); { int stringDataLength = 0; int stringDataCounter = 0; @@ -523,7 +523,7 @@ void Generator::generateCode() fprintf(out, " QtPrivate::MetaObjectForType<%s>::value(),\n", purestSuperClass.constData()); else fprintf(out, " nullptr,\n"); - fprintf(out, " qt_meta_stringdata_%s.offsetsAndSize,\n" + fprintf(out, " qt_meta_stringdata_%s.offsetsAndSizes,\n" " qt_meta_data_%s,\n", qualifiedClassNameIdentifier.constData(), qualifiedClassNameIdentifier.constData()); if (hasStaticMetaCall)