Fem: modernize C++: return braced init list
This commit is contained in:
@@ -37,7 +37,7 @@ using namespace Fem;
|
||||
// returns a string which represents the object e.g. when printed in python
|
||||
std::string FemPostPipelinePy::representation() const
|
||||
{
|
||||
return std::string("<FemPostPipeline object>");
|
||||
return {"<FemPostPipeline object>"};
|
||||
}
|
||||
|
||||
PyObject* FemPostPipelinePy::read(PyObject *args)
|
||||
|
||||
@@ -115,7 +115,7 @@ QVariant PropertyFemMeshItem::value(const App::Property*) const
|
||||
out << QObject::tr("Polyhedrons") << ": " << ctH << ", ";
|
||||
out << QObject::tr("Groups") << ": " << ctG;
|
||||
out << ']';
|
||||
return QVariant(str);
|
||||
return {str};
|
||||
}
|
||||
|
||||
QVariant PropertyFemMeshItem::toolTip(const App::Property* prop) const
|
||||
@@ -145,7 +145,7 @@ void PropertyFemMeshItem::setEditorData(QWidget* editor, const QVariant& data) c
|
||||
QVariant PropertyFemMeshItem::editorData(QWidget* editor) const
|
||||
{
|
||||
Q_UNUSED(editor);
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
int PropertyFemMeshItem::countNodes() const
|
||||
|
||||
@@ -130,7 +130,7 @@ void ViewProviderFemConstraint::setDisplayMode(const char* ModeName)
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderFemConstraint::claimChildren()const
|
||||
{
|
||||
return std::vector<App::DocumentObject*>();
|
||||
return {};
|
||||
}
|
||||
|
||||
void ViewProviderFemConstraint::setupContextMenu(QMenu *menu, QObject *receiver, const char *member)
|
||||
|
||||
@@ -416,7 +416,7 @@ std::string ViewProviderFemMesh::getElement(const SoDetail* detail) const
|
||||
str << "Node" << vertex;
|
||||
}
|
||||
else {
|
||||
return std::string();
|
||||
return {};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -455,7 +455,7 @@ SoDetail* ViewProviderFemMesh::getDetail(const char* subelement) const
|
||||
|
||||
std::vector<Base::Vector3d> ViewProviderFemMesh::getSelectionShape(const char* /*Element*/) const
|
||||
{
|
||||
return std::vector<Base::Vector3d>();
|
||||
return {};
|
||||
}
|
||||
|
||||
std::set<long> ViewProviderFemMesh::getHighlightNodes() const
|
||||
|
||||
@@ -21,7 +21,7 @@ using namespace FemGui;
|
||||
// returns a string which represents the object e.g. when printed in python
|
||||
std::string ViewProviderFemMeshPy::representation() const
|
||||
{
|
||||
return std::string("<ViewProviderFemMesh object>");
|
||||
return {"<ViewProviderFemMesh object>"};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ using namespace FemGui;
|
||||
// returns a string which represents the object e.g. when printed in python
|
||||
std::string ViewProviderFemPostPipelinePy::representation() const
|
||||
{
|
||||
return std::string("<ViewProviderFemPostPipeline object>");
|
||||
return {"<ViewProviderFemPostPipeline object>"};
|
||||
}
|
||||
|
||||
PyObject *ViewProviderFemPostPipelinePy::updateColorBars(PyObject *args)
|
||||
|
||||
Reference in New Issue
Block a user