Gui: modernize C++: return braced init list

This commit is contained in:
wmayer
2023-08-17 15:12:18 +02:00
committed by wwmayer
parent e444f86619
commit 54bb9c9c62
58 changed files with 286 additions and 276 deletions

View File

@@ -96,7 +96,7 @@ QIcon ViewProviderPythonFeatureImp::getIcon() const
try {
Py::Object ret(Base::pyCall(py_getIcon.ptr()));
if(ret.isNone())
return QIcon();
return {};
if(ret.isString()) {
std::string content = Py::String(ret).as_std_string("utf-8");
@@ -148,7 +148,7 @@ QIcon ViewProviderPythonFeatureImp::getIcon() const
}
}
return QIcon();
return {};
}
bool ViewProviderPythonFeatureImp::claimChildren(std::vector<App::DocumentObject*> &children) const
@@ -343,7 +343,7 @@ ViewProviderPythonFeatureImp::ValueT ViewProviderPythonFeatureImp::getDetailPath
std::vector<Base::Vector3d> ViewProviderPythonFeatureImp::getSelectionShape(const char* /*Element*/) const
{
return std::vector<Base::Vector3d>();
return {};
}
ViewProviderPythonFeatureImp::ValueT