From 172206f58e1a6ca77bd89387467438b65d11a3c3 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 22 Jan 2017 13:31:49 +0100 Subject: [PATCH] restore old DAG implementation and fix some build failures --- src/App/CMakeLists.txt | 2 +- src/App/DocumentObject.cpp | 23 +++++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/App/CMakeLists.txt b/src/App/CMakeLists.txt index fe2fb6627c48..4c4de306c75f 100644 --- a/src/App/CMakeLists.txt +++ b/src/App/CMakeLists.txt @@ -15,7 +15,7 @@ ENDIF(DOCDIR) add_definitions(-DBOOST_${Boost_VERSION}) #if you want to use the old DAG structure uncomment this line -#add_definitions(-DUSE_OLD_DAG) +add_definitions(-DUSE_OLD_DAG) #write relevant cmake variables to a file for later access with python. Exportet are all variables #starting with BUILD. As the variable only exists if the user set it to ON a dict is useless, we diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index 0c304f36e3fd..8f954fdf4c10 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -321,16 +321,18 @@ bool DocumentObject::_isInInListRecursive(const DocumentObject* /*act*/, if (_isInInListRecursive(obj, test, checkObj, depth - 1)) return true; } +#else + (void)test; + (void)checkObj; + (void)depth; +#endif return false; -#endif } bool DocumentObject::isInInListRecursive(DocumentObject *linkTo) const { -#ifndef USE_OLD_DAG return _isInInListRecursive(this, linkTo, this, getDocument()->countObjects()); -#endif } bool DocumentObject::isInInList(DocumentObject *linkTo) const @@ -340,10 +342,13 @@ bool DocumentObject::isInInList(DocumentObject *linkTo) const return true; else return false; +#else + (void)linkTo; + return false; #endif } -bool DocumentObject::_isInOutListRecursive(const DocumentObject *act, +bool DocumentObject::_isInOutListRecursive(const DocumentObject* act, const DocumentObject* test, const DocumentObject* checkObj, int depth) const { @@ -363,16 +368,19 @@ bool DocumentObject::_isInOutListRecursive(const DocumentObject *act, if (_isInOutListRecursive(obj, test, checkObj, depth - 1)) return true; } +#else + (void)act; + (void)test; + (void)checkObj; + (void)depth; +#endif return false; -#endif } bool DocumentObject::isInOutListRecursive(DocumentObject *linkTo) const { -#ifndef USE_OLD_DAG return _isInOutListRecursive(this, linkTo, this, getDocument()->countObjects()); -#endif } void DocumentObject::onLostLinkToObject(DocumentObject*) @@ -393,7 +401,6 @@ void DocumentObject::setDocument(App::Document* doc) void DocumentObject::onBeforeChange(const Property* prop) { - // Store current name in oldLabel, to be able to easily retrieve old name of document object later // when renaming expressions. if (prop == &Label)