summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-31 13:00:32 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-31 13:00:32 +0000
commit94f53ab6a93aefa007200b97846ce47ea166bd70 (patch)
tree0421134fe3a839da8b36c18636bd901ae9939f60 /vespalib
parentd0fa48f2559c297e7b9c15137f3c04bc32fc65fa (diff)
GC unused Context parameter
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/trace/trace.h14
-rw-r--r--vespalib/src/vespa/vespalib/trace/tracenode.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/trace/tracenode.h6
3 files changed, 12 insertions, 12 deletions
diff --git a/vespalib/src/vespa/vespalib/trace/trace.h b/vespalib/src/vespa/vespalib/trace/trace.h
index f6645f922b3..0040989c961 100644
--- a/vespalib/src/vespa/vespalib/trace/trace.h
+++ b/vespalib/src/vespa/vespalib/trace/trace.h
@@ -24,10 +24,10 @@ public:
/**
* Create an empty Trace with level set to 0 (no tracing)
*/
- Trace() : Trace(0) {}
- explicit Trace(uint32_t level) : _root(), _level(level) { }
- Trace & operator = (Trace &&) = default;
- Trace(Trace &&) = default;
+ Trace() noexcept : Trace(0) {}
+ explicit Trace(uint32_t level) noexcept : _root(), _level(level) { }
+ Trace & operator = (Trace &&) noexcept = default;
+ Trace(Trace &&) noexcept = default;
Trace(const Trace &);
Trace & operator = (const Trace &) = delete;
~Trace() = default;
@@ -53,7 +53,7 @@ public:
_level = std::min(level, 9u);
}
- uint32_t getLevel() const { return _level; }
+ uint32_t getLevel() const noexcept { return _level; }
/**
* Check if information with the given level should be traced. This method
@@ -63,7 +63,7 @@ public:
* @param level The trace level to test.
* @return True if tracing is enabled for the given level, false otherwise.
*/
- bool shouldTrace(uint32_t level) const { return level <= _level; }
+ bool shouldTrace(uint32_t level) const noexcept { return level <= _level; }
/**
* Add the given note to the trace information if tracing is enabled for
@@ -99,7 +99,7 @@ public:
bool isEmpty() const { return !_root || _root->isEmpty(); }
- uint32_t getNumChildren() const { return _root ? _root->getNumChildren() : 0; }
+ uint32_t getNumChildren() const noexcept { return _root ? _root->getNumChildren() : 0; }
const TraceNode & getChild(uint32_t child) const { return getRoot().getChild(child); }
string encode() const;
diff --git a/vespalib/src/vespa/vespalib/trace/tracenode.cpp b/vespalib/src/vespa/vespalib/trace/tracenode.cpp
index 072d76d8f32..881b9cc3300 100644
--- a/vespalib/src/vespa/vespalib/trace/tracenode.cpp
+++ b/vespalib/src/vespa/vespalib/trace/tracenode.cpp
@@ -46,7 +46,7 @@ sortChildren(std::vector<TraceNode> & children) {
} // namespace <unnamed>
-TraceNode::TraceNode()
+TraceNode::TraceNode() noexcept
: _note(""),
_children(),
_parent(nullptr),
@@ -80,7 +80,7 @@ TraceNode::TraceNode(const string &note, system_time timestamp)
_hasNote(true)
{ }
-TraceNode::TraceNode(system_time timestamp)
+TraceNode::TraceNode(system_time timestamp) noexcept
: _note(""),
_children(),
_parent(nullptr),
diff --git a/vespalib/src/vespa/vespalib/trace/tracenode.h b/vespalib/src/vespa/vespalib/trace/tracenode.h
index 1abf440ea53..4062dc78d3f 100644
--- a/vespalib/src/vespa/vespalib/trace/tracenode.h
+++ b/vespalib/src/vespa/vespalib/trace/tracenode.h
@@ -34,7 +34,7 @@ public:
/**
* Create an empty trace tree.
*/
- TraceNode();
+ TraceNode() noexcept;
/**
* Create a leaf node with the given note and timestamp.
@@ -47,11 +47,11 @@ public:
* Create a leaf node with no note and a time stamp.
* @param timestamp The timestamp to give to node.
*/
- explicit TraceNode(system_time timestamp);
+ explicit TraceNode(system_time timestamp) noexcept;
TraceNode & operator =(const TraceNode &);
TraceNode(TraceNode &&) noexcept;
- TraceNode & operator =(TraceNode &&) = default;
+ TraceNode & operator =(TraceNode &&) noexcept = default;
~TraceNode();
/**