aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Partitioning.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-04-21 08:43:03 +1000
committerNeil <nyamatongwe@gmail.com>2018-04-21 08:43:03 +1000
commit2a1338ce2d7c813db6f650154e2e3b6fdde06ff5 (patch)
treed076bc0442e8f06531bbaf04c13fc2e53a35b483 /src/Partitioning.h
parent15789ad27ff66c8928d7dc90683af11d6c045009 (diff)
downloadscintilla-mirror-2a1338ce2d7c813db6f650154e2e3b6fdde06ff5.tar.gz
Backport: 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. Backport of changeset 6724:f2dfdc0dddd3.
Diffstat (limited to 'src/Partitioning.h')
-rw-r--r--src/Partitioning.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Partitioning.h b/src/Partitioning.h
index 3872879e7..89faf8b8e 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())))