diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-27 13:46:10 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-27 13:46:10 (GMT) |
commit | bac92dbd0ecb7b9535b9acbcd019c88ff9981b4a (patch) | |
tree | 3e02392a80d53d54e289328d478922328e32fb4e /tests/csgtestcore.cc | |
parent | e502fab71d998c0bd025512c0c3884a1117479d1 (diff) | |
parent | 546ed1690486443e6780c1509626de8758a73498 (diff) |
Merge branch 'master' into color-priority
Diffstat (limited to 'tests/csgtestcore.cc')
-rw-r--r-- | tests/csgtestcore.cc | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index c2be326..e8a6878 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -19,6 +19,7 @@ #include "ThrownTogetherRenderer.h" #include "csgterm.h" +#include "csgtermnormalizer.h" #include "OffscreenView.h" #include <QApplication> @@ -315,12 +316,8 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) } // CSG normalization - csgInfo.root_norm_term = root_raw_term; - while (1) { - shared_ptr<CSGTerm> n = CSGTerm::normalize(csgInfo.root_norm_term); - if (csgInfo.root_norm_term == n) break; - csgInfo.root_norm_term = n; - } + CSGTermNormalizer normalizer; + csgInfo.root_norm_term = normalizer.normalize(root_raw_term); assert(csgInfo.root_norm_term); @@ -333,11 +330,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) csgInfo.highlights_chain = new CSGChain(); for (unsigned int i = 0; i < csgInfo.highlight_terms.size(); i++) { - while (1) { - shared_ptr<CSGTerm> n = CSGTerm::normalize(csgInfo.highlight_terms[i]); - if (csgInfo.highlight_terms[i] == n) break; - csgInfo.highlight_terms[i] = n; - } + csgInfo.highlight_terms[i] = normalizer.normalize(csgInfo.highlight_terms[i]); csgInfo.highlights_chain->import(csgInfo.highlight_terms[i]); } } @@ -347,11 +340,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) csgInfo.background_chain = new CSGChain(); for (unsigned int i = 0; i < csgInfo.background_terms.size(); i++) { - while (1) { - shared_ptr<CSGTerm> n = CSGTerm::normalize(csgInfo.background_terms[i]); - if (csgInfo.background_terms[i] == n) break; - csgInfo.background_terms[i] = n; - } + csgInfo.background_terms[i] = normalizer.normalize(csgInfo.background_terms[i]); csgInfo.background_chain->import(csgInfo.background_terms[i]); } } |