diff options
Diffstat (limited to 'src/RunStyles.cxx')
-rw-r--r-- | src/RunStyles.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 460d5d244..0f2196972 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -216,3 +216,14 @@ void RunStyles::DeleteRange(int position, int deleteLength) { } } +bool RunStyles::AllSame() const { + for (int run = 1; run < starts->Partitions(); run++) { + if (styles->ValueAt(run) != styles->ValueAt(run - 1)) + return false; + } + return true; +} + +bool RunStyles::AllSameAs(int value) const { + return AllSame() && (styles->ValueAt(0) == value); +} |