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 /searchlib | |
parent | 60b142c007083c773e910b44cc57d65e7f2c9274 (diff) |
Add noexcept specifiers.
Diffstat (limited to 'searchlib')
15 files changed, 15 insertions, 15 deletions
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; } |