diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-21 11:22:39 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-21 11:22:39 +1000 |
commit | b9bf45fea55a56203f16a1eea4de7f46d8bbf964 (patch) | |
tree | 09cbc057fdb43e61ba703617e19c8b3b341670fb /src/RunStyles.h | |
parent | 8634c0958c532e7d219e649353e1f1a74d52da1b (diff) | |
download | scintilla-mirror-b9bf45fea55a56203f16a1eea4de7f46d8bbf964.tar.gz |
Use noexcept in basic data structures where reasonable.
Declare the standard member functions in more classes
Diffstat (limited to 'src/RunStyles.h')
-rw-r--r-- | src/RunStyles.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/RunStyles.h b/src/RunStyles.h index af2eb3ec6..97673d04b 100644 --- a/src/RunStyles.h +++ b/src/RunStyles.h @@ -27,7 +27,7 @@ class RunStyles { private: std::unique_ptr<Partitioning<DISTANCE>> starts; std::unique_ptr<SplitVector<STYLE>> styles; - DISTANCE RunFromPosition(DISTANCE position) const; + DISTANCE RunFromPosition(DISTANCE position) const noexcept; DISTANCE SplitRun(DISTANCE position); void RemoveRun(DISTANCE run); void RemoveRunIfEmpty(DISTANCE run); @@ -36,23 +36,25 @@ public: RunStyles(); // Deleted so RunStyles objects can not be copied. RunStyles(const RunStyles &) = delete; + RunStyles(RunStyles &&) = delete; void operator=(const RunStyles &) = delete; + void operator=(RunStyles &&) = delete; ~RunStyles(); - DISTANCE Length() const; - STYLE ValueAt(DISTANCE position) const; - DISTANCE FindNextChange(DISTANCE position, DISTANCE end) const; - DISTANCE StartRun(DISTANCE position) const; - DISTANCE EndRun(DISTANCE position) const; + DISTANCE Length() const noexcept; + STYLE ValueAt(DISTANCE position) const noexcept; + DISTANCE FindNextChange(DISTANCE position, DISTANCE end) const noexcept; + DISTANCE StartRun(DISTANCE position) const noexcept; + DISTANCE EndRun(DISTANCE position) const noexcept; // Returns changed=true if some values may have changed FillResult<DISTANCE> FillRange(DISTANCE position, STYLE value, DISTANCE fillLength); void SetValueAt(DISTANCE position, STYLE value); void InsertSpace(DISTANCE position, DISTANCE insertLength); void DeleteAll(); void DeleteRange(DISTANCE position, DISTANCE deleteLength); - DISTANCE Runs() const; - bool AllSame() const; - bool AllSameAs(STYLE value) const; - DISTANCE Find(STYLE value, DISTANCE start) const; + DISTANCE Runs() const noexcept; + bool AllSame() const noexcept; + bool AllSameAs(STYLE value) const noexcept; + DISTANCE Find(STYLE value, DISTANCE start) const noexcept; void Check() const; }; |