summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2022-07-03 19:57:29 +0200
committerTor Egge <Tor.Egge@online.no>2022-07-03 19:57:29 +0200
commitb8eb1f71027af11b6db7d70d2ea10b4e98c569d4 (patch)
treea39b3852c3429ff8dfc5d9938ab85958e02e5ac5 /vespalib
parenta8d3000600c89a0f0cb9c77e88dd8f64516c591d (diff)
Add noexcept specifier.
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp4
-rw-r--r--vespalib/src/tests/util/generationhandler_stress/generation_handler_stress_test.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp b/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp
index 6988e41add1..de7d899e68a 100644
--- a/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp
+++ b/vespalib/src/tests/datastore/buffer_type/buffer_type_test.cpp
@@ -27,7 +27,7 @@ struct Setup {
_allocGrowFactor(0.5),
_resizing(false)
{}
- Setup(const Setup& rhs);
+ Setup(const Setup& rhs) noexcept;
Setup &minArrays(uint32_t value) { _minArrays = value; return *this; }
Setup &used(size_t value) { _usedElems = value; return *this; }
Setup &needed(size_t value) { _neededElems = value; return *this; }
@@ -36,7 +36,7 @@ struct Setup {
Setup &resizing(bool value) { _resizing = value; return *this; }
};
-Setup::Setup(const Setup& rhs)
+Setup::Setup(const Setup& rhs) noexcept
: _minArrays(rhs._minArrays),
_usedElems(rhs._usedElems.load(std::memory_order_relaxed)),
_neededElems(rhs._neededElems),
diff --git a/vespalib/src/tests/util/generationhandler_stress/generation_handler_stress_test.cpp b/vespalib/src/tests/util/generationhandler_stress/generation_handler_stress_test.cpp
index 57c765b8e44..74af25b54a8 100644
--- a/vespalib/src/tests/util/generationhandler_stress/generation_handler_stress_test.cpp
+++ b/vespalib/src/tests/util/generationhandler_stress/generation_handler_stress_test.cpp
@@ -48,11 +48,11 @@ struct IndirectContext {
static constexpr size_t values_size = 65536;
uint64_t _values[values_size];
- IndirectContext();
+ IndirectContext() noexcept;
uint64_t* calc_value_ptr(uint64_t idx) { return &_values[(idx & (values_size - 1))]; }
};
-IndirectContext::IndirectContext()
+IndirectContext::IndirectContext() noexcept
: _value_ptr(nullptr),
_pad(),
_values()
diff --git a/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.cpp b/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.cpp
index 6db97ff0761..e7f43de8f92 100644
--- a/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.cpp
+++ b/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.cpp
@@ -6,7 +6,7 @@ namespace vespalib {
//-----------------------------------------------------------------------------
-AdaptiveSequencedExecutor::Strand::Strand()
+AdaptiveSequencedExecutor::Strand::Strand() noexcept
: state(State::IDLE),
queue()
{
diff --git a/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.h b/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.h
index fbebf8b4e4c..fee9b8a61f8 100644
--- a/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.h
+++ b/vespalib/src/vespa/vespalib/util/adaptive_sequenced_executor.h
@@ -80,7 +80,7 @@ private:
enum class State { IDLE, WAITING, ACTIVE };
State state;
ArrayQueue<TaggedTask> queue;
- Strand();
+ Strand() noexcept;
~Strand();
};