diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-21 08:43:03 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-21 08:43:03 +1000 |
commit | 8634c0958c532e7d219e649353e1f1a74d52da1b (patch) | |
tree | 91352944c8b5c727a385426431d2e62f3301f6ad /src/SplitVector.h | |
parent | f00008fa5a49722171c5b288f988a64443122115 (diff) | |
download | scintilla-mirror-8634c0958c532e7d219e649353e1f1a74d52da1b.tar.gz |
Tighten definition of regular expression iterators so they are noexcept and
define all the standard member functions. This cascades to all methods called
by the iterators, affecting Document, CellBuffer, Partitioning, SplitVector and
UTF-8 and DBCS functions.
Other trivial functions declared noexcept.
Diffstat (limited to 'src/SplitVector.h')
-rw-r--r-- | src/SplitVector.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SplitVector.h b/src/SplitVector.h index 3fb595eef..40061c955 100644 --- a/src/SplitVector.h +++ b/src/SplitVector.h @@ -104,7 +104,7 @@ public: /// Retrieve the element at a particular position. /// Retrieving positions outside the range of the buffer returns empty or 0. - const T& ValueAt(ptrdiff_t position) const { + const T& ValueAt(ptrdiff_t position) const noexcept { if (position < part1Length) { if (position < 0) { return empty; @@ -144,7 +144,7 @@ public: /// Retrieve the element at a particular position. /// The position must be within bounds or an assertion is triggered. - const T &operator[](ptrdiff_t position) const { + const T &operator[](ptrdiff_t position) const noexcept { PLATFORM_ASSERT(position >= 0 && position < lengthBody); if (position < part1Length) { return body[position]; @@ -156,7 +156,7 @@ public: /// Retrieve reference to the element at a particular position. /// This, instead of the const variant, can be used to mutate in-place. /// The position must be within bounds or an assertion is triggered. - T &operator[](ptrdiff_t position) { + T &operator[](ptrdiff_t position) noexcept { PLATFORM_ASSERT(position >= 0 && position < lengthBody); if (position < part1Length) { return body[position]; @@ -166,7 +166,7 @@ public: } /// Retrieve the length of the buffer. - ptrdiff_t Length() const { + ptrdiff_t Length() const noexcept { return lengthBody; } |