diff options
| author | Andreas Grois <andreas.grois@jku.at> | 2015-11-27 11:02:12 +0100 |
|---|---|---|
| committer | Andreas Grois <andreas.grois@jku.at> | 2015-11-27 11:02:12 +0100 |
| commit | 77618b3511ee5edb6509902126293a084f9767bf (patch) | |
| tree | ab47be7697faca724cce06f074209ceed77840dc /anglerange.cpp | |
| parent | fc46d20e8411fe4b67269733f69d8a9dded4a42f (diff) | |
Angleset: Change add behaviour to not run combine()
The most often used command for angleset in this tool is the add function. If at the end of every add the combine() function is being called, a lot of CPU time is wasted.
Add now doesn't call combine(), and marks the angleset as dirty instead. All functions that require a clean angleset now check if it's dirty, and if yes call combine().
Diffstat (limited to 'anglerange.cpp')
| -rw-r--r-- | anglerange.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/anglerange.cpp b/anglerange.cpp index c62f760..99e6718 100644 --- a/anglerange.cpp +++ b/anglerange.cpp @@ -144,7 +144,7 @@ bool anglerange::isinside(const angleclass &val) const } } -anglerange anglerange::overlap(const anglerange &other) +anglerange anglerange::overlap(const anglerange &other) const { //storage for the return value: anglerange retval; //anglerange constructor without arguments: emtpy range [0:0] @@ -239,7 +239,7 @@ anglerange anglerange::overlap(const anglerange &other) return(retval); } -anglerange anglerange::combine(const anglerange &other) +anglerange anglerange::combine(const anglerange &other) const { anglerange retval; retval.setsorttype(sortby); //return value inherits current sorttype. |
