Part: modernize C++: return braced init list
This commit is contained in:
@@ -340,16 +340,19 @@ bool getReferencedSelection(const App::DocumentObject* thisObj, const Gui::Selec
|
||||
|
||||
QString getRefStr(const App::DocumentObject* obj, const std::vector<std::string>& sub)
|
||||
{
|
||||
if (!obj)
|
||||
return QString::fromLatin1("");
|
||||
if (!obj) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (PartDesign::Feature::isDatum(obj))
|
||||
if (PartDesign::Feature::isDatum(obj)) {
|
||||
return QString::fromLatin1(obj->getNameInDocument());
|
||||
else if (!sub.empty())
|
||||
}
|
||||
else if (!sub.empty()) {
|
||||
return QString::fromLatin1(obj->getNameInDocument()) + QString::fromLatin1(":") +
|
||||
QString::fromLatin1(sub.front().c_str());
|
||||
else
|
||||
return QString();
|
||||
}
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
std::string buildLinkSubPythonStr(const App::DocumentObject* obj, const std::vector<std::string>& subs)
|
||||
|
||||
Reference in New Issue
Block a user