From 5d2f2bc90b2e2cf0fd4c0407b8de38560da65ff1 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Tue, 29 Aug 2017 18:11:52 +0200 Subject: [PATCH] lsa: Mark region::merge() as noexcept It seems to satisfy this, and row_cache::do_update() will rely on it to simplify error handling. Message-Id: <1504023113-30374-1-git-send-email-tgrabiec@scylladb.com> --- utils/logalloc.cc | 4 ++-- utils/logalloc.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/logalloc.cc b/utils/logalloc.cc index 7781d3758d..94e9be9f23 100644 --- a/utils/logalloc.cc +++ b/utils/logalloc.cc @@ -1373,7 +1373,7 @@ public: // Merges another region into this region. The other region is made // to refer to this region. // Doesn't invalidate references to allocated objects. - void merge(region_impl& other) { + void merge(region_impl& other) noexcept { compaction_lock dct1(*this); compaction_lock dct2(other); degroup_temporarily dgt1(this); @@ -1614,7 +1614,7 @@ region_group* region::group() { return _impl->group(); } -void region::merge(region& other) { +void region::merge(region& other) noexcept { if (_impl != other._impl) { _impl->merge(*other._impl); other._impl = _impl; diff --git a/utils/logalloc.hh b/utils/logalloc.hh index 3b5691892d..985733a0b1 100644 --- a/utils/logalloc.hh +++ b/utils/logalloc.hh @@ -566,7 +566,7 @@ public: // Merges another region into this region. The other region is left empty. // Doesn't invalidate references to allocated objects. - void merge(region& other); + void merge(region& other) noexcept; // Compacts everything. Mainly for testing. // Invalidates references to allocated objects.