From a718c4a59dd251dd4c2cf8fca1ae6a5ebe1ad990 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 24 Apr 2012 01:17:21 +0200 Subject: Some trivial fixes for compiler warnings diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 0e849a8..46f4cfa 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -43,11 +43,8 @@ CGAL_Nef_polyhedron CGALEvaluator::evaluateCGALMesh(const AbstractNode &node) Traverser evaluate(*this, node, Traverser::PRE_AND_POSTFIX); evaluate.execute(); return this->root; - assert(this->visitedchildren.empty()); - } - else { - return CGALCache::instance()->get(this->tree.getIdString(node)); } + return CGALCache::instance()->get(this->tree.getIdString(node)); } bool CGALEvaluator::isCached(const AbstractNode &node) const diff --git a/src/OpenCSGWarningDialog.cc b/src/OpenCSGWarningDialog.cc index fdaaa50..5648576 100644 --- a/src/OpenCSGWarningDialog.cc +++ b/src/OpenCSGWarningDialog.cc @@ -1,7 +1,7 @@ #include "OpenCSGWarningDialog.h" #include "Preferences.h" -OpenCSGWarningDialog::OpenCSGWarningDialog(QWidget *parent) +OpenCSGWarningDialog::OpenCSGWarningDialog(QWidget*) { setupUi(this); diff --git a/src/csgtermnormalizer.cc b/src/csgtermnormalizer.cc index b4bfa4c..6600758 100644 --- a/src/csgtermnormalizer.cc +++ b/src/csgtermnormalizer.cc @@ -46,8 +46,8 @@ shared_ptr CSGTermNormalizer::normalizePass(shared_ptr term) if (!term || term->type == CSGTerm::TYPE_PRIMITIVE) return term; if (term->left) term->left = normalizePass(term->left); } while (term->type != CSGTerm::TYPE_UNION && - (term->right && term->right->type != CSGTerm::TYPE_PRIMITIVE || - term->left && term->left->type == CSGTerm::TYPE_UNION)); + ((term->right && term->right->type != CSGTerm::TYPE_PRIMITIVE) || + (term->left && term->left->type == CSGTerm::TYPE_UNION))); term->right = normalizePass(term->right); // FIXME: Do we need to take into account any transformation of item here? diff --git a/src/mainwin.cc b/src/mainwin.cc index 90e5f61..087cb30 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -1037,8 +1037,7 @@ bool MainWindow::compileTopLevelDocument(bool reload) { bool shouldcompiletoplevel = !reload; - if (reload && - (fileChangedOnDisk() && checkEditorModified()) || + if ((reload && fileChangedOnDisk() && checkEditorModified()) || includesChanged()) { shouldcompiletoplevel = true; refreshDocument(); -- cgit v0.10.1