improve whitespaces
This commit is contained in:
parent
69857f37f7
commit
f3f7b01202
|
@ -1967,7 +1967,8 @@ int Document::recompute()
|
||||||
|
|
||||||
std::vector<App::DocumentObject*> Document::topologicalSort() const
|
std::vector<App::DocumentObject*> Document::topologicalSort() const
|
||||||
{
|
{
|
||||||
// topological sort algorithm described here: https://de.wikipedia.org/wiki/Topologische_Sortierung#Algorithmus_f.C3.BCr_das_Topologische_Sortieren
|
// topological sort algorithm described here:
|
||||||
|
// https://de.wikipedia.org/wiki/Topologische_Sortierung#Algorithmus_f.C3.BCr_das_Topologische_Sortieren
|
||||||
vector < App::DocumentObject* > ret;
|
vector < App::DocumentObject* > ret;
|
||||||
ret.reserve(d->objectArray.size());
|
ret.reserve(d->objectArray.size());
|
||||||
map < App::DocumentObject*,int > countMap;
|
map < App::DocumentObject*,int > countMap;
|
||||||
|
@ -2035,9 +2036,10 @@ int Document::recompute()
|
||||||
}
|
}
|
||||||
#ifdef FC_DEBUG
|
#ifdef FC_DEBUG
|
||||||
// check if all objects are recalculated which were thouched
|
// check if all objects are recalculated which were thouched
|
||||||
for (auto objectIt : d->objectArray)
|
for (auto objectIt : d->objectArray) {
|
||||||
if (objectIt->isTouched())
|
if (objectIt->isTouched())
|
||||||
cerr << "Document::recompute(): " << objectIt->getNameInDocument() << " still touched after recompute" << endl;
|
cerr << "Document::recompute(): " << objectIt->getNameInDocument() << " still touched after recompute" << endl;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return objectCount;
|
return objectCount;
|
||||||
|
@ -2694,9 +2696,10 @@ std::vector<App::DocumentObject*> Document::getRootObjects() const
|
||||||
{
|
{
|
||||||
std::vector < App::DocumentObject* > ret;
|
std::vector < App::DocumentObject* > ret;
|
||||||
|
|
||||||
for (auto objectIt : d->objectArray)
|
for (auto objectIt : d->objectArray) {
|
||||||
if (objectIt->getInList().size() == 0)
|
if (objectIt->getInList().empty())
|
||||||
ret.push_back(objectIt);
|
ret.push_back(objectIt);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
|
@ -341,7 +341,9 @@ bool DocumentObject::isInInList(DocumentObject *linkTo) const
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DocumentObject::_isInOutListRecursive(const DocumentObject *act, const DocumentObject* test, const DocumentObject* checkObj, int depth) const
|
bool DocumentObject::_isInOutListRecursive(const DocumentObject *act,
|
||||||
|
const DocumentObject* test,
|
||||||
|
const DocumentObject* checkObj, int depth) const
|
||||||
{
|
{
|
||||||
#ifndef USE_OLD_DAG
|
#ifndef USE_OLD_DAG
|
||||||
std::vector <DocumentObject*> outList = act->getOutList();
|
std::vector <DocumentObject*> outList = act->getOutList();
|
||||||
|
|
|
@ -211,13 +211,13 @@ Py::List DocumentObjectPy::getInListRecursive(void) const
|
||||||
{
|
{
|
||||||
Py::List ret;
|
Py::List ret;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
std::vector<DocumentObject*> list = getDocumentObjectPtr()->getInListRecursive();
|
std::vector<DocumentObject*> list = getDocumentObjectPtr()->getInListRecursive();
|
||||||
|
|
||||||
for (std::vector<DocumentObject*>::iterator It = list.begin(); It != list.end(); ++It)
|
for (std::vector<DocumentObject*>::iterator It = list.begin(); It != list.end(); ++It)
|
||||||
ret.append(Py::Object((*It)->getPyObject(), true));
|
ret.append(Py::Object((*It)->getPyObject(), true));
|
||||||
|
|
||||||
}catch (const Base::Exception& e) {
|
}
|
||||||
|
catch (const Base::Exception& e) {
|
||||||
throw Py::IndexError(e.what());
|
throw Py::IndexError(e.what());
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -238,7 +238,6 @@ Py::List DocumentObjectPy::getOutListRecursive(void) const
|
||||||
{
|
{
|
||||||
Py::List ret;
|
Py::List ret;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
std::vector<DocumentObject*> list = getDocumentObjectPtr()->getOutListRecursive();
|
std::vector<DocumentObject*> list = getDocumentObjectPtr()->getOutListRecursive();
|
||||||
|
|
||||||
// creat the python list for the output
|
// creat the python list for the output
|
||||||
|
|
Loading…
Reference in New Issue
Block a user