Skip to content

Commit 0ca1323

Browse files
committed
use C++11 {} initializer for returnValue
1 parent e185fc3 commit 0ca1323

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

generator/shellimplgenerator.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,7 @@ void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
151151
if (hasReturnValue) {
152152
s << " ";
153153
writeTypeInfo(s, fun->type(), typeOptions);
154-
s << " returnValue";
155-
if (fun->type()->isPrimitive()) {
156-
s << " = 0";
157-
}
158-
s << ";" << endl;
154+
s << " returnValue{};" << endl;
159155
}
160156
s << " void* args[" << QString::number(args.size() + 1) << "] = {NULL";
161157
for (int i = 0; i < args.size(); ++i) {

0 commit comments

Comments
 (0)