diff options
-rw-r--r-- | src/tools/moc/generator.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 7264b5bf66..e8b1d2fb6a 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -1207,7 +1207,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " auto *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData()); } - fprintf(out, " Q_UNUSED(_t)\n"); + fprintf(out, " (void)_t;\n"); fprintf(out, " switch (_id) {\n"); for (int methodindex = 0; methodindex < methodList.size(); ++methodindex) { const FunctionDef &f = methodList.at(methodindex); @@ -1313,7 +1313,7 @@ void Generator::generateStaticMetacall() fprintf(out, " }\n }\n"); } if (!anythingUsed) - fprintf(out, " Q_UNUSED(result);\n"); + fprintf(out, " (void)result;\n"); fprintf(out, " }"); needElse = true; } @@ -1372,7 +1372,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " auto *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData()); } - fprintf(out, " Q_UNUSED(_t)\n"); + fprintf(out, " (void)_t;\n"); if (needTempVarForGet) fprintf(out, " void *_v = _a[0];\n"); fprintf(out, " switch (_id) {\n"); @@ -1418,7 +1418,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " auto *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData()); } - fprintf(out, " Q_UNUSED(_t)\n"); + fprintf(out, " (void)_t;\n"); fprintf(out, " void *_v = _a[0];\n"); fprintf(out, " switch (_id) {\n"); for (int propindex = 0; propindex < cdef->propertyList.size(); ++propindex) { @@ -1474,7 +1474,7 @@ void Generator::generateStaticMetacall() } else { fprintf(out, " %s *_t = reinterpret_cast<%s *>(_o);\n", cdef->classname.constData(), cdef->classname.constData()); } - fprintf(out, " Q_UNUSED(_t)\n"); + fprintf(out, " (void)_t;\n"); fprintf(out, " switch (_id) {\n"); for (int propindex = 0; propindex < cdef->propertyList.size(); ++propindex) { const PropertyDef &p = cdef->propertyList.at(propindex); @@ -1499,14 +1499,14 @@ void Generator::generateStaticMetacall() fprintf(out, "\n"); if (methodList.isEmpty()) { - fprintf(out, " Q_UNUSED(_o);\n"); + fprintf(out, " (void)_o;\n"); if (cdef->constructorList.isEmpty() && automaticPropertyMetaTypes.isEmpty() && methodsWithAutomaticTypesHelper(methodList).isEmpty()) { - fprintf(out, " Q_UNUSED(_id);\n"); - fprintf(out, " Q_UNUSED(_c);\n"); + fprintf(out, " (void)_id;\n"); + fprintf(out, " (void)_c;\n"); } } if (!isUsed_a) - fprintf(out, " Q_UNUSED(_a);\n"); + fprintf(out, " (void)_a;\n"); fprintf(out, "}\n\n"); } |