summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-03 15:13:29 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-03 15:13:29 +0000
commit2f4dc8dfcdc79e621b8f2df992192c638591de1f (patch)
tree55fb786aa88ad343bb367969c017119fd34b12d8 /config
parent7aba0842e9f987cead29416ba797aebea241b9f6 (diff)
Add noexcept
Diffstat (limited to 'config')
-rw-r--r--config/src/vespa/config/common/configupdate.h8
-rw-r--r--config/src/vespa/config/subscription/configsubscription.h10
-rw-r--r--config/src/vespa/config/subscription/configsubscriptionset.h4
3 files changed, 11 insertions, 11 deletions
diff --git a/config/src/vespa/config/common/configupdate.h b/config/src/vespa/config/common/configupdate.h
index adafbbd3c0f..5263f429718 100644
--- a/config/src/vespa/config/common/configupdate.h
+++ b/config/src/vespa/config/common/configupdate.h
@@ -16,10 +16,10 @@ public:
ConfigUpdate(const ConfigUpdate &) = delete;
ConfigUpdate & operator = (const ConfigUpdate &) = delete;
~ConfigUpdate();
- const ConfigValue & getValue() const { return _value; }
- bool hasChanged() const { return _hasChanged; }
- int64_t getGeneration() const { return _generation; }
- void merge(const ConfigUpdate & b) { _hasChanged = _hasChanged || b.hasChanged(); }
+ const ConfigValue & getValue() const noexcept { return _value; }
+ bool hasChanged() const noexcept { return _hasChanged; }
+ int64_t getGeneration() const noexcept { return _generation; }
+ void merge(const ConfigUpdate & b) noexcept { _hasChanged = _hasChanged || b.hasChanged(); }
private:
ConfigValue _value;
bool _hasChanged;
diff --git a/config/src/vespa/config/subscription/configsubscription.h b/config/src/vespa/config/subscription/configsubscription.h
index ffd151eb82c..c6ce7eb6188 100644
--- a/config/src/vespa/config/subscription/configsubscription.h
+++ b/config/src/vespa/config/subscription/configsubscription.h
@@ -39,22 +39,22 @@ public:
*
* @return true if changed, false if not.
*/
- bool isChanged() const { return _isChanged; }
+ bool isChanged() const noexcept { return _isChanged; }
/**
* Returns the last generation that actually changed the config.
*/
- int64_t getLastGenerationChanged() const { return _lastGenerationChanged; }
+ int64_t getLastGenerationChanged() const noexcept { return _lastGenerationChanged; }
/// Used by ConfigSubscriptionSet
- SubscriptionId getSubscriptionId() const { return _id; }
- const ConfigKey & getKey() const { return _key; }
+ SubscriptionId getSubscriptionId() const noexcept { return _id; }
+ const ConfigKey & getKey() const noexcept { return _key; }
bool nextUpdate(int64_t generation, vespalib::steady_time deadline);
int64_t getGeneration() const;
bool hasChanged() const;
bool hasGenerationChanged() const;
void flip();
- void reset() { _isChanged = false; }
+ void reset() noexcept { _isChanged = false; }
void close();
// Used by ConfigManager
diff --git a/config/src/vespa/config/subscription/configsubscriptionset.h b/config/src/vespa/config/subscription/configsubscriptionset.h
index 1d75480d602..4b6d970770d 100644
--- a/config/src/vespa/config/subscription/configsubscriptionset.h
+++ b/config/src/vespa/config/subscription/configsubscriptionset.h
@@ -38,7 +38,7 @@ public:
*
* @return generation number
*/
- int64_t getGeneration() const {
+ int64_t getGeneration() const noexcept {
return _currentGeneration;
}
@@ -51,7 +51,7 @@ public:
/**
* Checks if this subscription set is closed.
*/
- bool isClosed() const {
+ bool isClosed() const noexcept {
return (_state.load(std::memory_order_relaxed) == CLOSED);
}