summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qarraydataops.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-11-11 15:50:37 +0100
committerLars Knoll <lars.knoll@qt.io>2020-11-17 11:47:21 +0100
commit21bce8925725bfea1abc371301e943d8970c71fc (patch)
treeff705c07d9d8f460d120be106ae8093eb5343163 /src/corelib/tools/qarraydataops.h
parent6431565e0a62365259196b02c1aec892d9f85a0a (diff)
Add a couple of noexcept to methods that can't throw
Trivial methods that don't modify any data for the most part. Also mark removeFirst/Last() as noexcept. Those methods can't throw exceptions as we require ~T() to be noexcept. Change-Id: I8698705c6113909aa8f7ae021a932df48a224d5d Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qarraydataops.h')
-rw-r--r--src/corelib/tools/qarraydataops.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h
index 028d63efc2c..747417e5a0a 100644
--- a/src/corelib/tools/qarraydataops.h
+++ b/src/corelib/tools/qarraydataops.h
@@ -726,7 +726,7 @@ public:
std::destroy(b, e);
}
- void eraseFirst()
+ void eraseFirst() noexcept
{
Q_ASSERT(this->isMutable());
Q_ASSERT(this->size);
@@ -735,7 +735,7 @@ public:
--this->size;
}
- void eraseLast()
+ void eraseLast() noexcept
{
Q_ASSERT(this->isMutable());
Q_ASSERT(this->size);