From 5f0ec490e641769a21f7e0b8241bb020a9c71584 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 19 Aug 2023 01:01:45 +0200 Subject: [PATCH] Core: modernize C++: return braced init list --- src/Base/Interpreter.cpp | 2 +- src/Gui/propertyeditor/PropertyItem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index 8d52860328..f7fed3677b 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -287,7 +287,7 @@ std::string InterpreterSingleton::runStringWithKey(const char *psCmd, const char } else { PyException::ThrowException(); - return std::string(); // just to quieten code analyzers + return {}; // just to quieten code analyzers } } Py_DECREF(presult); diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index a48c87a655..6d588eacbe 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -426,7 +426,7 @@ QVariant PropertyItem::toString(const QVariant& prop) const ss << "ERR!"; } - return QVariant(QString::fromUtf8(ss.str().c_str())); + return {QString::fromUtf8(ss.str().c_str())}; } QVariant PropertyItem::value(const App::Property* /*prop*/) const