aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@qt.io>2020-05-25 13:50:48 +0200
committerNikolai Kosjar <nikolai.kosjar@qt.io>2020-05-26 04:25:36 +0000
commitb193e3cea196b9c32da491f6b5de2865066ca6e4 (patch)
tree24dedb3c78d5a8039e9ba168106d6798687ddb3c /src/tools
parentb3ffd8d1ebe2cfd3f84bfd3d9e926e1a291ffbf6 (diff)
C++: Make cplusplus-update-frontend generate "nullptr"
The commit 2e14df7561ee10c7a408bd3ebb4944016ecdd1f4 replaced some "0" by "nullptr" on e.g. the generated ASTClone.cpp. Running cplusplus-update-frontend reverts the changes for the generated files again, so adapt cplusplus-update-frontend to generate "nullptr" instead. Change-Id: I16750da0df57692405c5b33462f1f63f05c175c1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp b/src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
index 47a8ead13fc..d32494c7bf1 100644
--- a/src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
+++ b/src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
@@ -667,7 +667,7 @@ protected:
if (typeName.endsWith("ListAST")) {
*out << " for (" << typeName << " *iter = " << memberName << ", **ast_iter = &ast->" << memberName << ";" << endl
<< " iter; iter = iter->next, ast_iter = &(*ast_iter)->next)" << endl
- << " *ast_iter = new (pool) " << typeName << "((iter->value) ? iter->value->clone(pool) : 0);" << endl;
+ << " *ast_iter = new (pool) " << typeName << "((iter->value) ? iter->value->clone(pool) : nullptr);" << endl;
} else if (typeName.endsWith("AST")) {
*out << " if (" << memberName << ")" << endl
<< " ast->" << memberName << " = " << memberName << "->clone(pool);" << endl;
@@ -1585,7 +1585,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
const QString elementName = className.left(className.length() - 7) + QLatin1String("AST");
out
<< " " << className << " *" << methodName << "("
- << elementName << " *value, " << className << " *next = 0)" << endl
+ << elementName << " *value, " << className << " *next = nullptr)" << endl
<< " {" << endl
<< " " << className << " *list = new (&pool) " << className << ";" << endl
<< " list->next = next;" << endl