[App] code style fixes by MSVC

- automatic .clang fixes while checking for nullptr, no actual code change
This commit is contained in:
Uwe
2022-07-18 13:03:42 +02:00
parent 763a575b23
commit 32ffcc7eda
2 changed files with 29 additions and 30 deletions

View File

@@ -115,7 +115,7 @@ void PropertyLinkBase::unregisterLabelReferences()
void PropertyLinkBase::getLabelReferences(std::vector<std::string> &subs,const char *subname) {
const char *dot;
for(;(subname=strchr(subname,'$'))!=nullptr; subname=dot+1) {
for (; (subname = strchr(subname, '$')) != nullptr; subname = dot + 1) {
++subname;
dot = strchr(subname,'.');
if(!dot) break;
@@ -154,7 +154,7 @@ std::string PropertyLinkBase::updateLabelReference(const App::DocumentObject *pa
// hierarchies, we have to search for all occurrences, and make sure the
// referenced sub-object at the found hierarchy is actually the given
// object.
for(const char *pos=subname; ((pos=strstr(pos,ref.c_str()))!=nullptr); pos+=ref.size()) {
for (const char *pos = subname; ((pos = strstr(pos, ref.c_str())) != nullptr); pos += ref.size()) {
auto sub = std::string(subname,pos+ref.size()-subname);
auto sobj = parent->getSubObject(sub.c_str());
if(sobj == obj) {