From 7d7d3d61d6c663aa1a416027ef9a7fc98559ccb0 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 15 Apr 2013 20:10:51 +1000 Subject: RunStyles can be corrupted by filling 0 length ranges and ranges that go past end so throw std::invalid_argument exceptions for these conditions. Provide a Check method to validate the consistency of a RunStyles and throw std::runtime_error if corruption is detected. --- src/RunStyles.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/RunStyles.h') diff --git a/src/RunStyles.h b/src/RunStyles.h index 4e90969a2..521c701fa 100644 --- a/src/RunStyles.h +++ b/src/RunStyles.h @@ -43,6 +43,8 @@ public: bool AllSame() const; bool AllSameAs(int value) const; int Find(int value, int start) const; + + void Check(); }; #ifdef SCI_NAMESPACE -- cgit v1.2.3