App: fix trailing whitespace

This commit is contained in:
luz paz
2022-12-02 18:02:05 -05:00
committed by Chris Hennes
parent c16e88845b
commit 0e08b51a58
13 changed files with 133 additions and 133 deletions

View File

@@ -62,7 +62,7 @@ void PropertyExpressionContainer::slotRelabelDocument(const App::Document &doc)
// For use a private _ExprContainers to track all living
// PropertyExpressionContainer including those inside undo/redo stack,
// because document relabel is not undoable/redoable.
if(doc.getOldLabel() != doc.Label.getValue()) {
for(auto prop : _ExprContainers)
prop->onRelabeledDocument(doc);
@@ -280,7 +280,7 @@ void PropertyExpressionEngine::Save(Base::Writer &writer) const
<< Property::encodeAttribute(it->first.toString()) <<"\" expression=\""
<< Property::encodeAttribute(expression) << "\"";
if (!comment.empty())
writer.Stream() << " comment=\""
writer.Stream() << " comment=\""
<< Property::encodeAttribute(comment) << "\"";
writer.Stream() << "/>" << std::endl;
}
@@ -431,7 +431,7 @@ void PropertyExpressionEngine::onContainerRestored() {
UpdateElementReferenceExpressionVisitor<PropertyExpressionEngine> v(*this);
for(auto &e : expressions) {
auto expr = e.second.expression;
if(expr)
if(expr)
expr->visit(v);
}
}
@@ -473,8 +473,8 @@ void PropertyExpressionEngine::setValue(const ObjectIdentifier & path, std::shar
// Check if the current expression equals the new one and do nothing if so to reduce unneeded computations
ExpressionMap::iterator it = expressions.find(usePath);
if(it != expressions.end()
&& (expr == it->second.expression ||
(expr && it->second.expression
&& (expr == it->second.expression ||
(expr && it->second.expression
&& expr->isSame(*it->second.expression))))
{
return;
@@ -523,7 +523,7 @@ struct cycle_detector : public boost::dfs_visitor<> {
*/
void PropertyExpressionEngine::buildGraph(const ExpressionMap & exprs,
boost::unordered_map<int, ObjectIdentifier> & revNodes,
boost::unordered_map<int, ObjectIdentifier> & revNodes,
DiGraph & g, ExecuteOption option) const
{
boost::unordered_map<ObjectIdentifier, int> nodes;
@@ -538,7 +538,7 @@ void PropertyExpressionEngine::buildGraph(const ExpressionMap & exprs,
bool is_output = prop->testStatus(App::Property::Output)||(prop->getType()&App::Prop_Output);
if((is_output && option==ExecuteNonOutput) || (!is_output && option==ExecuteOutput))
continue;
if(option == ExecuteOnRestore
if(option == ExecuteOnRestore
&& !prop->testStatus(Property::Transient)
&& !(prop->getType() & Prop_Transient)
&& !prop->testStatus(Property::EvalOnRestore))
@@ -732,7 +732,7 @@ void PropertyExpressionEngine::getPathsToDocumentObject(DocumentObject* obj,
auto it = deps.find(obj);
if(it==deps.end())
continue;
for(auto &dep : it->second)
for(auto &dep : it->second)
paths.insert(paths.end(),dep.second.begin(),dep.second.end());
}
}
@@ -927,7 +927,7 @@ bool PropertyExpressionEngine::adjustLink(const std::set<DocumentObject*> &inLis
return true;
}
void PropertyExpressionEngine::updateElementReference(DocumentObject *feature, bool reverse, bool notify)
void PropertyExpressionEngine::updateElementReference(DocumentObject *feature, bool reverse, bool notify)
{
(void)notify;
if(!feature)
@@ -954,7 +954,7 @@ bool PropertyExpressionEngine::referenceChanged() const {
}
Property *PropertyExpressionEngine::CopyOnImportExternal(
const std::map<std::string,std::string> &nameMap) const
const std::map<std::string,std::string> &nameMap) const
{
std::unique_ptr<PropertyExpressionEngine> engine;
for(auto it=expressions.begin();it!=expressions.end();++it) {
@@ -963,7 +963,7 @@ Property *PropertyExpressionEngine::CopyOnImportExternal(
#else
std::shared_ptr<Expression> expr(it->second.expression->importSubNames(nameMap));
#endif
if(!expr && !engine)
if(!expr && !engine)
continue;
if(!engine) {
engine.reset(new PropertyExpressionEngine);
@@ -981,7 +981,7 @@ Property *PropertyExpressionEngine::CopyOnImportExternal(
return engine.release();
}
Property *PropertyExpressionEngine::CopyOnLabelChange(App::DocumentObject *obj,
Property *PropertyExpressionEngine::CopyOnLabelChange(App::DocumentObject *obj,
const std::string &ref, const char *newLabel) const
{
std::unique_ptr<PropertyExpressionEngine> engine;
@@ -991,7 +991,7 @@ Property *PropertyExpressionEngine::CopyOnLabelChange(App::DocumentObject *obj,
#else
std::shared_ptr<Expression> expr(it->second.expression->updateLabelReference(obj,ref,newLabel));
#endif
if(!expr && !engine)
if(!expr && !engine)
continue;
if(!engine) {
engine.reset(new PropertyExpressionEngine);
@@ -1011,7 +1011,7 @@ Property *PropertyExpressionEngine::CopyOnLabelChange(App::DocumentObject *obj,
return engine.release();
}
Property *PropertyExpressionEngine::CopyOnLinkReplace(const App::DocumentObject *parent,
Property *PropertyExpressionEngine::CopyOnLinkReplace(const App::DocumentObject *parent,
App::DocumentObject *oldObj, App::DocumentObject *newObj) const
{
std::unique_ptr<PropertyExpressionEngine> engine;
@@ -1023,7 +1023,7 @@ Property *PropertyExpressionEngine::CopyOnLinkReplace(const App::DocumentObject
std::shared_ptr<Expression> expr(
it->second.expression->replaceObject(parent,oldObj,newObj));
#endif
if(!expr && !engine)
if(!expr && !engine)
continue;
if(!engine) {
engine.reset(new PropertyExpressionEngine);
@@ -1043,11 +1043,11 @@ Property *PropertyExpressionEngine::CopyOnLinkReplace(const App::DocumentObject
return engine.release();
}
std::map<App::ObjectIdentifier, const App::Expression*>
PropertyExpressionEngine::getExpressions() const
std::map<App::ObjectIdentifier, const App::Expression*>
PropertyExpressionEngine::getExpressions() const
{
std::map<App::ObjectIdentifier, const Expression*> res;
for(auto &v : expressions)
for(auto &v : expressions)
res[v.first] = v.second.expression.get();
return res;
}