diff options
author | Tor Egge <Tor.Egge@online.no> | 2021-12-11 02:45:14 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2021-12-11 02:45:14 +0100 |
commit | 0109b1a5f3e300cbeb151a91bef027b406cace39 (patch) | |
tree | 87bfe7484f54023265da902e4cfef6b2384d2eb8 | |
parent | 60b142c007083c773e910b44cc57d65e7f2c9274 (diff) |
Add noexcept specifiers.
34 files changed, 40 insertions, 40 deletions
diff --git a/document/src/vespa/document/annotation/alternatespanlist.h b/document/src/vespa/document/annotation/alternatespanlist.h index 92c58135431..f21cafedb41 100644 --- a/document/src/vespa/document/annotation/alternatespanlist.h +++ b/document/src/vespa/document/annotation/alternatespanlist.h @@ -12,7 +12,7 @@ class AlternateSpanList : public SpanNode { struct Subtree { SpanList *span_list; double probability; - Subtree() : span_list(0), probability(0.0) {} + Subtree() noexcept : span_list(0), probability(0.0) {} }; std::vector<Subtree> _subtrees; diff --git a/document/src/vespa/document/annotation/annotation.h b/document/src/vespa/document/annotation/annotation.h index 4acd4d2f045..46e5a1a5d41 100644 --- a/document/src/vespa/document/annotation/annotation.h +++ b/document/src/vespa/document/annotation/annotation.h @@ -22,7 +22,7 @@ public: : _type(&type), _node(nullptr), _value(value.release()) {} Annotation(const AnnotationType &annotation) : _type(&annotation), _node(nullptr), _value(nullptr) { } - Annotation() : _type(nullptr), _node(nullptr), _value(nullptr) { } + Annotation() noexcept : _type(nullptr), _node(nullptr), _value(nullptr) { } ~Annotation(); void setType(const AnnotationType * v) { _type = v; } diff --git a/document/src/vespa/document/annotation/span.h b/document/src/vespa/document/annotation/span.h index ab6f61843d1..5f3a78bf98c 100644 --- a/document/src/vespa/document/annotation/span.h +++ b/document/src/vespa/document/annotation/span.h @@ -14,7 +14,7 @@ class Span : public SpanNode { public: typedef std::unique_ptr<Span> UP; - Span(int32_t from_pos=0, int32_t len=0) : _from(from_pos), _length(len) {} + Span(int32_t from_pos=0, int32_t len=0) noexcept : _from(from_pos), _length(len) {} int32_t from() const { return _from; } int32_t length() const { return _length; } diff --git a/document/src/vespa/document/select/resultset.h b/document/src/vespa/document/select/resultset.h index ef5133807a7..1289f61046c 100644 --- a/document/src/vespa/document/select/resultset.h +++ b/document/src/vespa/document/select/resultset.h @@ -20,7 +20,7 @@ class ResultSet static std::vector<ResultSet> _ors; static std::vector<ResultSet> _nots; public: - ResultSet() : _val(0u) { } + ResultSet() noexcept : _val(0u) { } static uint32_t enumToMask(uint32_t rhs) { return 1u << rhs; diff --git a/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancer.h b/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancer.h index 19975bd9465..6627fc57ef2 100644 --- a/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancer.h +++ b/documentapi/src/vespa/documentapi/messagebus/policies/loadbalancer.h @@ -10,7 +10,7 @@ class LoadBalancer { public: class NodeInfo { public: - NodeInfo() : valid(false), sent(0), busy(0), weight(1.0) {}; + NodeInfo() noexcept : valid(false), sent(0), busy(0), weight(1.0) {}; bool valid; uint32_t sent; diff --git a/eval/src/tests/ann/for-sift-hit.h b/eval/src/tests/ann/for-sift-hit.h index 0c920fe8109..4002dff84ee 100644 --- a/eval/src/tests/ann/for-sift-hit.h +++ b/eval/src/tests/ann/for-sift-hit.h @@ -5,6 +5,6 @@ struct Hit { uint32_t docid; double distance; - Hit() : docid(0u), distance(0.0) {} + Hit() noexcept : docid(0u), distance(0.0) {} Hit(int id, double dist) : docid(id), distance(dist) {} }; diff --git a/eval/src/tests/ann/xp-lsh-nns.cpp b/eval/src/tests/ann/xp-lsh-nns.cpp index bdc61a39610..1557da0b84c 100644 --- a/eval/src/tests/ann/xp-lsh-nns.cpp +++ b/eval/src/tests/ann/xp-lsh-nns.cpp @@ -130,7 +130,7 @@ struct LshHit { double distance; uint32_t docid; int hash_distance; - LshHit() : distance(0.0), docid(0u), hash_distance(0) {} + LshHit() noexcept : distance(0.0), docid(0u), hash_distance(0) {} LshHit(int id, double dist, int hd = 0) : distance(dist), docid(id), hash_distance(hd) {} }; diff --git a/eval/src/vespa/eval/eval/aggr.h b/eval/src/vespa/eval/eval/aggr.h index a932d0ac932..133d9b520cd 100644 --- a/eval/src/vespa/eval/eval/aggr.h +++ b/eval/src/vespa/eval/eval/aggr.h @@ -90,7 +90,7 @@ private: size_t _cnt; public: using value_type = T; - constexpr Avg() : _sum{0}, _cnt{0} {} + constexpr Avg() noexcept : _sum{0}, _cnt{0} {} constexpr Avg(T value) : _sum{value}, _cnt{1} {} constexpr void sample(T value) { _sum += value; @@ -109,7 +109,7 @@ private: size_t _cnt; public: using value_type = T; - constexpr Count() : _cnt{0} {} + constexpr Count() noexcept : _cnt{0} {} constexpr Count(T) : _cnt{1} {} constexpr void sample(T) { ++_cnt; } constexpr void merge(const Count &rhs) { _cnt += rhs._cnt; } @@ -122,7 +122,7 @@ private: T _prod; public: using value_type = T; - constexpr Prod() : _prod{null_value()} {} + constexpr Prod() noexcept : _prod{null_value()} {} constexpr Prod(T value) : _prod{value} {} constexpr void sample(T value) { _prod = combine(_prod, value); } constexpr void merge(const Prod &rhs) { _prod = combine(_prod, rhs._prod); } @@ -137,7 +137,7 @@ private: T _sum; public: using value_type = T; - constexpr Sum() : _sum{null_value()} {} + constexpr Sum() noexcept : _sum{null_value()} {} constexpr Sum(T value) : _sum{value} {} constexpr void sample(T value) { _sum = combine(_sum, value); } constexpr void merge(const Sum &rhs) { _sum = combine(_sum, rhs._sum); } @@ -152,7 +152,7 @@ private: T _max; public: using value_type = T; - constexpr Max() : _max{null_value()} {} + constexpr Max() noexcept : _max{null_value()} {} constexpr Max(T value) : _max{value} {} constexpr void sample(T value) { _max = combine(_max, value); } constexpr void merge(const Max &rhs) { _max = combine(_max, rhs._max); } @@ -167,7 +167,7 @@ private: std::vector<T> _seen; public: using value_type = T; - constexpr Median() : _seen() {} + constexpr Median() noexcept : _seen() {} constexpr Median(T value) : _seen({value}) {} constexpr void sample(T value) { _seen.push_back(value); } constexpr void merge(const Median &rhs) { @@ -205,7 +205,7 @@ private: T _min; public: using value_type = T; - constexpr Min() : _min{null_value()} {} + constexpr Min() noexcept : _min{null_value()} {} constexpr Min(T value) : _min{value} {} constexpr void sample(T value) { _min = combine(_min, value); } constexpr void merge(const Min &rhs) { _min = combine(_min, rhs._min); } diff --git a/fsa/src/vespa/fsa/vectorizer.h b/fsa/src/vespa/fsa/vectorizer.h index 3dead2faa2e..6ce94e92569 100644 --- a/fsa/src/vespa/fsa/vectorizer.h +++ b/fsa/src/vespa/fsa/vectorizer.h @@ -49,7 +49,7 @@ public: /** * @brief Default constructor, creates empty item with zero weight. */ - VectorItem() : _term(), _weight(0.0), _hits() {} + VectorItem() noexcept : _term(), _weight(0.0), _hits() {} /** * @brief Copy constructor. diff --git a/searchcommon/src/vespa/searchcommon/attribute/hnsw_index_params.h b/searchcommon/src/vespa/searchcommon/attribute/hnsw_index_params.h index 77e994daa85..4f9d3c5593c 100644 --- a/searchcommon/src/vespa/searchcommon/attribute/hnsw_index_params.h +++ b/searchcommon/src/vespa/searchcommon/attribute/hnsw_index_params.h @@ -22,7 +22,7 @@ public: HnswIndexParams(uint32_t max_links_per_node_in, uint32_t neighbors_to_explore_at_insert_in, DistanceMetric distance_metric_in, - bool multi_threaded_indexing_in = false) + bool multi_threaded_indexing_in = false) noexcept : _max_links_per_node(max_links_per_node_in), _neighbors_to_explore_at_insert(neighbors_to_explore_at_insert_in), _distance_metric(distance_metric_in), diff --git a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h index f51043e9960..4aa8a3f6392 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h +++ b/searchcore/src/vespa/searchcore/proton/matching/docid_range_scheduler.h @@ -174,7 +174,7 @@ private: std::condition_variable condition; bool is_idle; DocidRange next_range; - Worker() : condition(), is_idle(false), next_range() {} + Worker() noexcept : condition(), is_idle(false), next_range() {} }; DocidRangeSplitter _splitter; uint32_t _min_task; diff --git a/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h b/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h index 7cdf8991fb4..047c6fcaf13 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h +++ b/searchcore/src/vespa/searchcore/proton/matching/matching_stats.h @@ -67,7 +67,7 @@ public: Avg _wait_time; friend MatchingStats; public: - Partition() + Partition() noexcept : _docsCovered(0), _docsMatched(0), _docsRanked(0), diff --git a/searchlib/src/vespa/searchlib/aggregation/fs4hit.h b/searchlib/src/vespa/searchlib/aggregation/fs4hit.h index 135bbe44887..7cb078fe7e8 100644 --- a/searchlib/src/vespa/searchlib/aggregation/fs4hit.h +++ b/searchlib/src/vespa/searchlib/aggregation/fs4hit.h @@ -19,7 +19,7 @@ private: public: DECLARE_IDENTIFIABLE_NS2(search, aggregation, FS4Hit); DECLARE_NBO_SERIALIZE; - FS4Hit() : Hit(), _path(0), _docId(0), _globalId(), _distributionKey(-1) {} + FS4Hit() noexcept : Hit(), _path(0), _docId(0), _globalId(), _distributionKey(-1) {} FS4Hit(DocId docId, HitRank rank) : Hit(rank), _path(0), _docId(docId), _globalId(), _distributionKey(-1) {} FS4Hit *clone() const override { return new FS4Hit(*this); } diff --git a/searchlib/src/vespa/searchlib/common/indexmetainfo.h b/searchlib/src/vespa/searchlib/common/indexmetainfo.h index 9b6c7c8e477..2ba8bebb698 100644 --- a/searchlib/src/vespa/searchlib/common/indexmetainfo.h +++ b/searchlib/src/vespa/searchlib/common/indexmetainfo.h @@ -15,7 +15,7 @@ public: bool valid; uint64_t syncToken; vespalib::string dirName; - Snapshot() : valid(false), syncToken(0), dirName() {} + Snapshot() noexcept : valid(false), syncToken(0), dirName() {} Snapshot(bool valid_, uint64_t syncToken_, const vespalib::string &dirName_) : valid(valid_), syncToken(syncToken_), dirName(dirName_) {} bool operator==(const Snapshot &rhs) const { diff --git a/searchlib/src/vespa/searchlib/diskindex/field_length_scanner.h b/searchlib/src/vespa/searchlib/diskindex/field_length_scanner.h index 181607c3fc6..1feabed1eb1 100644 --- a/searchlib/src/vespa/searchlib/diskindex/field_length_scanner.h +++ b/searchlib/src/vespa/searchlib/diskindex/field_length_scanner.h @@ -23,7 +23,7 @@ class FieldLengthScanner { static uint16_t make_element_mask(uint32_t element_id) { return (1u << element_id); } public: - FieldLengthEntry() + FieldLengthEntry() noexcept : _field_length(0), _elements(0) { diff --git a/searchlib/src/vespa/searchlib/docstore/chunk.h b/searchlib/src/vespa/searchlib/docstore/chunk.h index d40ba27ef45..1190f40aa97 100644 --- a/searchlib/src/vespa/searchlib/docstore/chunk.h +++ b/searchlib/src/vespa/searchlib/docstore/chunk.h @@ -47,7 +47,7 @@ private: class LidMeta { public: - LidMeta() : _lid(0), _size(0) { } + LidMeta() noexcept : _lid(0), _size(0) { } LidMeta(uint32_t lid, uint32_t sz) : _lid(lid), _size(sz) { } uint32_t getLid() const { return _lid; } uint32_t size() const { return _size; } diff --git a/searchlib/src/vespa/searchlib/expression/floatbucketresultnode.h b/searchlib/src/vespa/searchlib/expression/floatbucketresultnode.h index 080b4f0fc5c..7b89e90efe9 100644 --- a/searchlib/src/vespa/searchlib/expression/floatbucketresultnode.h +++ b/searchlib/src/vespa/searchlib/expression/floatbucketresultnode.h @@ -33,7 +33,7 @@ public: DECLARE_EXPRESSIONNODE(FloatBucketResultNode); DECLARE_NBO_SERIALIZE; - FloatBucketResultNode() : _from(0.0), _to(0.0) {} + FloatBucketResultNode() noexcept : _from(0.0), _to(0.0) {} FloatBucketResultNode(double from, double to) : _from(from), _to(to) {} size_t hash() const override; int onCmp(const Identifiable & b) const override; diff --git a/searchlib/src/vespa/searchlib/expression/floatresultnode.h b/searchlib/src/vespa/searchlib/expression/floatresultnode.h index 5bff232fe2f..c31f9a2de40 100644 --- a/searchlib/src/vespa/searchlib/expression/floatresultnode.h +++ b/searchlib/src/vespa/searchlib/expression/floatresultnode.h @@ -13,7 +13,7 @@ public: DECLARE_EXPRESSIONNODE(FloatResultNode); DECLARE_NBO_SERIALIZE; void visitMembers(vespalib::ObjectVisitor &visitor) const override; - FloatResultNode(double v=0) : _value(v) { } + FloatResultNode(double v=0) noexcept : _value(v) { } size_t hash() const override { size_t tmpHash(0); memcpy(&tmpHash, &_value, sizeof(tmpHash)); return tmpHash; } int onCmp(const Identifiable & b) const override; void add(const ResultNode & b) override; diff --git a/searchlib/src/vespa/searchlib/expression/integerbucketresultnode.h b/searchlib/src/vespa/searchlib/expression/integerbucketresultnode.h index d5a2306200c..95a4555e6e4 100644 --- a/searchlib/src/vespa/searchlib/expression/integerbucketresultnode.h +++ b/searchlib/src/vespa/searchlib/expression/integerbucketresultnode.h @@ -31,7 +31,7 @@ private: public: DECLARE_EXPRESSIONNODE(IntegerBucketResultNode); DECLARE_NBO_SERIALIZE; - IntegerBucketResultNode() : _from(0), _to(0) {} + IntegerBucketResultNode() noexcept : _from(0), _to(0) {} IntegerBucketResultNode(int64_t from, int64_t to) : _from(from), _to(to) {} size_t hash() const override; int onCmp(const Identifiable & b) const override; diff --git a/searchlib/src/vespa/searchlib/expression/stringresultnode.h b/searchlib/src/vespa/searchlib/expression/stringresultnode.h index b9d127a2e2c..79d849bdd15 100644 --- a/searchlib/src/vespa/searchlib/expression/stringresultnode.h +++ b/searchlib/src/vespa/searchlib/expression/stringresultnode.h @@ -12,7 +12,7 @@ public: DECLARE_EXPRESSIONNODE(StringResultNode); DECLARE_NBO_SERIALIZE; void visitMembers(vespalib::ObjectVisitor &visitor) const override; - StringResultNode(const char * v="") : _value(v) { } + StringResultNode(const char * v="") noexcept : _value(v) { } StringResultNode(vespalib::stringref v) : _value(v) { } size_t hash() const override; int onCmp(const Identifiable & b) const override; diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h index 684857e5a7c..d9375f12d54 100644 --- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h @@ -14,7 +14,7 @@ namespace search::features { struct NativeFieldMatchParam : public NativeParamBase { static const uint32_t NOT_DEF_FIELD_LENGTH; - NativeFieldMatchParam() : NativeParamBase(), firstOccTable(NULL), numOccTable(NULL), averageFieldLength(NOT_DEF_FIELD_LENGTH), firstOccImportance(0.5) { } + NativeFieldMatchParam() noexcept : NativeParamBase(), firstOccTable(NULL), numOccTable(NULL), averageFieldLength(NOT_DEF_FIELD_LENGTH), firstOccImportance(0.5) { } const fef::Table * firstOccTable; const fef::Table * numOccTable; uint32_t averageFieldLength; diff --git a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h index 0c61ddf9bae..e40779dae14 100644 --- a/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h +++ b/searchlib/src/vespa/searchlib/features/nativeproximityfeature.h @@ -13,7 +13,7 @@ namespace search::features { **/ struct NativeProximityParam : public NativeParamBase { - NativeProximityParam() : NativeParamBase(), proximityTable(NULL), revProximityTable(NULL), proximityImportance(0.5) { } + NativeProximityParam() noexcept : NativeParamBase(), proximityTable(NULL), revProximityTable(NULL), proximityImportance(0.5) { } const fef::Table * proximityTable; const fef::Table * revProximityTable; feature_t proximityImportance; diff --git a/searchlib/src/vespa/searchlib/fef/test/ftlib.h b/searchlib/src/vespa/searchlib/fef/test/ftlib.h index 437f2d330ec..d4a18fcd40e 100644 --- a/searchlib/src/vespa/searchlib/fef/test/ftlib.h +++ b/searchlib/src/vespa/searchlib/fef/test/ftlib.h @@ -127,7 +127,7 @@ private: struct FtQueryTerm { FtQueryTerm(const vespalib::string t, uint32_t tw = 100, feature_t co = 0.1f, feature_t si = 0.1f) : term(t), termWeight(tw), connexity(co), significance(si) {} - FtQueryTerm() : term(), termWeight(100), connexity(0.1f), significance(0.1f) {} + FtQueryTerm() noexcept : term(), termWeight(100), connexity(0.1f), significance(0.1f) {} vespalib::string term; search::query::Weight termWeight; feature_t connexity; diff --git a/searchlib/src/vespa/searchlib/grouping/collect.h b/searchlib/src/vespa/searchlib/grouping/collect.h index 6d899723f1a..55b5ea3ddd4 100644 --- a/searchlib/src/vespa/searchlib/grouping/collect.h +++ b/searchlib/src/vespa/searchlib/grouping/collect.h @@ -90,7 +90,7 @@ private: typedef vespalib::Array<ResultAccessor> ResultAccessorList; class SortInfo { public: - SortInfo() : _index(0), _sign(1) { } + SortInfo() noexcept : _index(0), _sign(1) { } SortInfo(uint8_t index, int8_t sign) : _index(index), _sign(sign) { } uint8_t getIndex() const { return _index; } int8_t getSign() const { return _sign; } diff --git a/searchlib/src/vespa/searchlib/grouping/groupref.h b/searchlib/src/vespa/searchlib/grouping/groupref.h index 49e56ed5bed..78331e4caaf 100644 --- a/searchlib/src/vespa/searchlib/grouping/groupref.h +++ b/searchlib/src/vespa/searchlib/grouping/groupref.h @@ -9,7 +9,7 @@ namespace grouping { class GroupRef { public: - GroupRef() : _ref(-1) { } + GroupRef() noexcept : _ref(-1) { } GroupRef(uint32_t ref) : _ref(ref) { } uint32_t getRef() const { return _ref; } bool valid() const { return _ref != static_cast<uint32_t>(-1); } diff --git a/searchlib/src/vespa/searchlib/index/bitvectorkeys.h b/searchlib/src/vespa/searchlib/index/bitvectorkeys.h index cacb0f59721..332b0ed3524 100644 --- a/searchlib/src/vespa/searchlib/index/bitvectorkeys.h +++ b/searchlib/src/vespa/searchlib/index/bitvectorkeys.h @@ -9,7 +9,7 @@ struct BitVectorWordSingleKey { uint32_t _numDocs; uint32_t _pad; - BitVectorWordSingleKey() + BitVectorWordSingleKey() noexcept : _wordNum(0), _numDocs(0), _pad(0) diff --git a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h index 6a64aa561e4..d160db9784e 100644 --- a/searchlib/src/vespa/searchlib/query/streaming/queryterm.h +++ b/searchlib/src/vespa/searchlib/query/streaming/queryterm.h @@ -39,7 +39,7 @@ public: }; class FieldInfo { public: - FieldInfo() : _hitListOffset(0), _hitCount(0), _fieldLength(0) { } + FieldInfo() noexcept : _hitListOffset(0), _hitCount(0), _fieldLength(0) { } FieldInfo(uint32_t hitListOffset, uint32_t hitCount, uint32_t fieldLength) : _hitListOffset(hitListOffset), _hitCount(hitCount), _fieldLength(fieldLength) { } size_t getHitOffset() const { return _hitListOffset; } diff --git a/staging_vespalib/src/vespa/vespalib/util/jsonstream.h b/staging_vespalib/src/vespa/vespalib/util/jsonstream.h index fc2ae61b37e..d60151f0478 100644 --- a/staging_vespalib/src/vespa/vespalib/util/jsonstream.h +++ b/staging_vespalib/src/vespa/vespalib/util/jsonstream.h @@ -44,7 +44,7 @@ class JsonStream : public JsonStreamTypes { string object_key; size_t array_index; - StateEntry() + StateEntry() noexcept : state(State::ROOT), object_key(""), array_index(size_t(0)) {} StateEntry(State s) : state(s), object_key(""), array_index(size_t(0)) {} diff --git a/vdslib/src/vespa/vdslib/container/documentsummary.h b/vdslib/src/vespa/vdslib/container/documentsummary.h index 2c23e51319b..bbfeb684559 100644 --- a/vdslib/src/vespa/vdslib/container/documentsummary.h +++ b/vdslib/src/vespa/vdslib/container/documentsummary.h @@ -35,7 +35,7 @@ public: private: class Summary { public: - Summary() : _docIdOffset(0), _summaryOffset(0), _summaryLen(0) { } + Summary() noexcept : _docIdOffset(0), _summaryOffset(0), _summaryLen(0) { } Summary(uint32_t docIdOffset, uint32_t summaryOffset, uint32_t summaryLen) : _docIdOffset(docIdOffset), _summaryOffset(summaryOffset), _summaryLen(summaryLen) { } const char * getDocId(const char * base) const { return base + _docIdOffset; } const void * getSummary(const char * base, size_t & sz) const { sz = _summaryLen; return base + _summaryOffset; } diff --git a/vdslib/src/vespa/vdslib/container/searchresult.h b/vdslib/src/vespa/vdslib/container/searchresult.h index 6b6e0aaae12..a777a4731e6 100644 --- a/vdslib/src/vespa/vdslib/container/searchresult.h +++ b/vdslib/src/vespa/vdslib/container/searchresult.h @@ -82,7 +82,7 @@ public: private: class Hit { public: - Hit() : _lid(0), _rank(0), _docIdOffset(0), _index(0) { } + Hit() noexcept : _lid(0), _rank(0), _docIdOffset(0), _index(0) { } Hit(uint32_t lid, RankType rank, size_t docIdOffset, size_t index) : _lid(lid), _rank(rank), _docIdOffset(docIdOffset), _index(index) { } const char * getDocId(const char * base) const { return base + getDocIdOffset(); } uint32_t getLid() const { return _lid; } diff --git a/vdslib/src/vespa/vdslib/distribution/redundancygroupdistribution.h b/vdslib/src/vespa/vdslib/distribution/redundancygroupdistribution.h index c7b1a3a05f7..dad7933ed2c 100644 --- a/vdslib/src/vespa/vdslib/distribution/redundancygroupdistribution.h +++ b/vdslib/src/vespa/vdslib/distribution/redundancygroupdistribution.h @@ -17,7 +17,7 @@ class RedundancyGroupDistribution : public document::Printable { std::vector<uint16_t> _values; public: - RedundancyGroupDistribution() {} + RedundancyGroupDistribution() noexcept {} /** * Create a group distribution spec from the serialized version. * Asterisk entries are represented as zero. diff --git a/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp b/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp index 77bdbf6f58b..51380028ffa 100644 --- a/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp +++ b/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp @@ -83,7 +83,7 @@ public: ~SparseBenchmark(); protected: struct P { - P(uint32_t key=0, int32_t value=0) : + P(uint32_t key=0, int32_t value=0) noexcept : _key(key), _value(value) { } diff --git a/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp b/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp index b808635a8cc..8d5d393fe22 100644 --- a/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp +++ b/vespalib/src/tests/simple_thread_bundle/simple_thread_bundle_test.cpp @@ -10,7 +10,7 @@ using namespace vespalib::fixed_thread_bundle; struct Cnt : Runnable { size_t x; - Cnt() : x(0) {} + Cnt() noexcept : x(0) {} void run() override { ++x; } }; diff --git a/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp b/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp index 13b0d003909..eb82425c819 100644 --- a/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp +++ b/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp @@ -19,7 +19,7 @@ struct Worker : Runnable { size_t iter; uint64_t input; uint64_t output; - Worker() : iter(1), input(0), output(0) {} + Worker() noexcept : iter(1), input(0), output(0) {} void init(size_t n, uint64_t i) { iter = n; input = i; |