Skip to content

Commit

Permalink
removed useless std::move on const and unmovable objects
Browse files Browse the repository at this point in the history
  • Loading branch information
asapelkin authored and wwmayer committed Nov 21, 2019
1 parent 5ee4a2e commit bbbabf9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/App/ExpressionParser.tab.c
Expand Up @@ -1835,7 +1835,7 @@ yyparse (void)

case 66:
#line 190 "ExpressionParser.y" /* yacc.c:1646 */
{ (yyvsp[-1].expr)->addComponent(std::move((yyvsp[0].component))); (yyval.expr) = (yyvsp[-1].expr); }
{ (yyvsp[-1].expr)->addComponent((yyvsp[0].component)); (yyval.expr) = (yyvsp[-1].expr); }
#line 1840 "ExpressionParser.tab.c" /* yacc.c:1646 */
break;

Expand Down
2 changes: 1 addition & 1 deletion src/App/ObjectIdentifier.cpp
Expand Up @@ -1857,7 +1857,7 @@ void ObjectIdentifier::resolveAmbiguity(ResolveResults &result) {
if(result.resolvedDocumentObject == owner) {
setDocumentObjectName(owner,false,std::move(subname));
}else if(result.flags.test(ResolveByIdentifier))
setDocumentObjectName(std::move(result.resolvedDocumentObject),true,std::move(subname));
setDocumentObjectName(result.resolvedDocumentObject,true,std::move(subname));
else
setDocumentObjectName(
String(result.resolvedDocumentObject->Label.getStrValue(),true,false),true,std::move(subname));
Expand Down
2 changes: 1 addition & 1 deletion src/App/ObjectIdentifier.h
Expand Up @@ -267,7 +267,7 @@ class AppExport ObjectIdentifier {
documentObjectNameSet = other.documentObjectNameSet;
localProperty = other.localProperty;
_cache = std::move(other._cache);
_hash = std::move(other._hash);
_hash = other._hash;
return *this;
}

Expand Down
4 changes: 2 additions & 2 deletions src/App/PropertyLinks.cpp
Expand Up @@ -2161,7 +2161,7 @@ void PropertyLinkSubList::Restore(Base::XMLReader &reader)
reader.readEndElement("LinkSubList");

// assignment
setValues(values,std::move(SubNames),std::move(shadows));
setValues(values,SubNames,std::move(shadows));
_mapped.swap(mapped);
}

Expand Down Expand Up @@ -2940,7 +2940,7 @@ void PropertyXLink::setValue(App::DocumentObject *lValue,
_pcLink=lValue;
if(docInfo && docInfo->pcDoc)
stamp=docInfo->pcDoc->LastModifiedDate.getValue();
objectName = std::move(name);
objectName = name;
setSubValues(std::move(subs),std::move(shadows));
hasSetValue();
}
Expand Down

0 comments on commit bbbabf9

Please sign in to comment.