Import: modernize C++: return braced init list
This commit is contained in:
@@ -991,7 +991,7 @@ TDF_Label ExportOCAF2::findComponent(const char *subname, TDF_Label label, TDF_L
|
||||
Handle(XCAFDoc_GraphNode) ret;
|
||||
if(labels.Length() && (FindSHUO(labels,ret) || aShapeTool->SetSHUO(labels,ret)))
|
||||
return ret->Label();
|
||||
return TDF_Label();
|
||||
return {};
|
||||
}
|
||||
TDF_LabelSequence components;
|
||||
TDF_Label ref;
|
||||
@@ -1018,7 +1018,7 @@ TDF_Label ExportOCAF2::findComponent(const char *subname, TDF_Label label, TDF_L
|
||||
}
|
||||
}
|
||||
}
|
||||
return TDF_Label();
|
||||
return {};
|
||||
}
|
||||
|
||||
void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj,
|
||||
@@ -1191,7 +1191,7 @@ TDF_Label ExportOCAF2::exportObject(App::DocumentObject* parentObj,
|
||||
if(!obj || shape.isNull()) {
|
||||
if (obj)
|
||||
FC_WARN(obj->getFullName() << " has null shape");
|
||||
return TDF_Label();
|
||||
return {};
|
||||
}
|
||||
|
||||
//sub may contain more than one hierarchy, e.g. Assembly container may use
|
||||
|
||||
@@ -31,7 +31,7 @@ using namespace Import;
|
||||
// returns a string which represents the object e.g. when printed in python
|
||||
std::string StepShapePy::representation() const
|
||||
{
|
||||
return std::string("<StepShape object>");
|
||||
return {"<StepShape object>"};
|
||||
}
|
||||
|
||||
PyObject *StepShapePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
|
||||
@@ -99,7 +99,7 @@ gp_Pnt ImpExpDxfRead::makePoint(const double* p)
|
||||
sp2 = sp2 * optionScaling;
|
||||
sp3 = sp3 * optionScaling;
|
||||
}
|
||||
return gp_Pnt(sp1,sp2,sp3);
|
||||
return {sp1,sp2,sp3};
|
||||
}
|
||||
|
||||
void ImpExpDxfRead::OnReadLine(const double* s, const double* e, bool /*hidden*/)
|
||||
|
||||
@@ -534,7 +534,7 @@ private:
|
||||
auto vp = Gui::Application::Instance->getViewProvider(obj);
|
||||
if(vp)
|
||||
return vp->getElementColors(subname);
|
||||
return std::map<std::string,App::Color>();
|
||||
return {};
|
||||
}
|
||||
|
||||
Py::Object exportOptions(const Py::Tuple& args)
|
||||
|
||||
Reference in New Issue
Block a user