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/Partitioning.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/Partitioning.h')
-rw-r--r-- | src/Partitioning.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Partitioning.h b/src/Partitioning.h index d1887e325..9237df0fa 100644 --- a/src/Partitioning.h +++ b/src/Partitioning.h @@ -102,7 +102,7 @@ public: ~Partitioning() { } - T Partitions() const { + T Partitions() const noexcept { return static_cast<T>(body->Length())-1; } @@ -154,7 +154,7 @@ public: body->Delete(partition); } - T PositionFromPartition(T partition) const { + T PositionFromPartition(T partition) const noexcept { PLATFORM_ASSERT(partition >= 0); PLATFORM_ASSERT(partition < body->Length()); const ptrdiff_t lengthBody = body->Length(); @@ -168,7 +168,7 @@ public: } /// Return value in range [0 .. Partitions() - 1] even for arguments outside interval - T PartitionFromPosition(T pos) const { + T PartitionFromPosition(T pos) const noexcept { if (body->Length() <= 1) return 0; if (pos >= (PositionFromPartition(Partitions()))) |