From f8875aa1cf738fe2e2cdfc29ffc346b51ea1ec1c Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 2 Dec 2019 09:06:59 +1100 Subject: Use noexcept and const where reasonable. --- src/SplitVector.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SplitVector.h') diff --git a/src/SplitVector.h b/src/SplitVector.h index 39895a700..a8f1ed1d9 100644 --- a/src/SplitVector.h +++ b/src/SplitVector.h @@ -76,11 +76,11 @@ public: ~SplitVector() { } - ptrdiff_t GetGrowSize() const { + ptrdiff_t GetGrowSize() const noexcept { return growSize; } - void SetGrowSize(ptrdiff_t growSize_) { + void SetGrowSize(ptrdiff_t growSize_) noexcept { growSize = growSize_; } @@ -290,7 +290,7 @@ public: std::copy(body.data() + position, body.data() + position + range1Length, buffer); buffer += range1Length; position = position + range1Length + gapLength; - ptrdiff_t range2Length = retrieveLength - range1Length; + const ptrdiff_t range2Length = retrieveLength - range1Length; std::copy(body.data() + position, body.data() + position + range2Length, buffer); } -- cgit v1.2.3