diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-12-06 19:06:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-06 19:06:13 +0100 |
commit | 275fe933a20d6f0c1c9bb54a895b577c2a9fe10a (patch) | |
tree | ffc4773ea83b82b5317610fe3b311812cf61f38f | |
parent | a3b290499cd8609982481f5c6c329ccc20897118 (diff) | |
parent | 941fc8232160e3f952af96a4e1e056d54807d587 (diff) |
Merge pull request #15679 from vespa-engine/arnej/some-cxx2a-additions
Arnej/some cxx2a additions
5 files changed, 6 insertions, 6 deletions
diff --git a/document/src/vespa/document/annotation/span.h b/document/src/vespa/document/annotation/span.h index 02672ebed9c..051db3d54c0 100644 --- a/document/src/vespa/document/annotation/span.h +++ b/document/src/vespa/document/annotation/span.h @@ -24,7 +24,7 @@ public: void accept(SpanTreeVisitor &visitor) const override; }; -inline bool operator==(const Span &span1, const Span &span2) { +inline bool operator==(const Span &span1, const Span &span2) noexcept { return span1.from() == span2.from() && span1.length() == span2.length(); } diff --git a/eval/src/vespa/eval/eval/tensor_spec.h b/eval/src/vespa/eval/eval/tensor_spec.h index 4f11491571c..f8a06adf331 100644 --- a/eval/src/vespa/eval/eval/tensor_spec.h +++ b/eval/src/vespa/eval/eval/tensor_spec.h @@ -36,7 +36,7 @@ public: Label(const char *name_in) : index(npos), name(name_in) {} bool is_mapped() const { return (index == npos); } bool is_indexed() const { return (index != npos); } - bool operator==(const Label &rhs) const { + bool operator==(const Label &rhs) const noexcept { return ((index == rhs.index) && (name == rhs.name)); } diff --git a/searchlib/src/apps/docstore/documentstoreinspect.cpp b/searchlib/src/apps/docstore/documentstoreinspect.cpp index 2526ce456ae..8a3bb6b247b 100644 --- a/searchlib/src/apps/docstore/documentstoreinspect.cpp +++ b/searchlib/src/apps/docstore/documentstoreinspect.cpp @@ -71,7 +71,7 @@ DocumentStoreInspectApp::Main() if (cmd == "dumpidxfile") { vespalib::string idxfile; if (_argc >= 4) { - if (_argv[2] == vespalib::string("--idxfile")) { + if (vespalib::string(_argv[2]) == vespalib::string("--idxfile")) { idxfile = _argv[3]; dumpIdxFile(idxfile); } else { diff --git a/searchlib/src/tests/queryeval/multibitvectoriterator/multibitvectoriterator_bench.cpp b/searchlib/src/tests/queryeval/multibitvectoriterator/multibitvectoriterator_bench.cpp index e1d0e034a89..10e03238e81 100644 --- a/searchlib/src/tests/queryeval/multibitvectoriterator/multibitvectoriterator_bench.cpp +++ b/searchlib/src/tests/queryeval/multibitvectoriterator/multibitvectoriterator_bench.cpp @@ -118,8 +118,8 @@ Test::Main() return -1; } _type = _argv[1]; - _strict = _argv[2] == vespalib::string("strict"); - _optimize = _argv[3] == vespalib::string("optimize"); + _strict = vespalib::string(_argv[2]) == vespalib::string("strict"); + _optimize = vespalib::string(_argv[3]) == vespalib::string("optimize"); _numSearch = strtoul(_argv[4], NULL, 0); _numDocs = strtoul(_argv[5], NULL, 0); for (int i(6); i < _argc; i++) { diff --git a/vespalib/src/vespa/vespalib/data/slime/symbol.h b/vespalib/src/vespa/vespalib/data/slime/symbol.h index b63d264f233..93dd0d9b69a 100644 --- a/vespalib/src/vespa/vespalib/data/slime/symbol.h +++ b/vespalib/src/vespa/vespalib/data/slime/symbol.h @@ -23,7 +23,7 @@ public: bool undefined() const { return (_value == UNDEFINED); } uint32_t getValue() const { return _value; } bool operator<(const Symbol &rhs) const noexcept { return (_value < rhs._value); } - bool operator==(const Symbol &rhs) const { return (_value == rhs._value); } + bool operator==(const Symbol &rhs) const noexcept { return (_value == rhs._value); } }; } // namespace vespalib::slime |