aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-08 21:15:18 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-09 07:16:24 +0000
commit050edc855e1e45dda3b2b98996f551e909a1a4e7 (patch)
tree573e86c9c8fb5f160d61132c7266289b3ad8b176
parenta01266777240a6e5db4c92c4801664165400b2cf (diff)
Deinline as compiler makes the best choices.
-rw-r--r--configutil/src/lib/modelinspect.cpp12
-rw-r--r--configutil/src/lib/modelinspect.h10
-rw-r--r--document/src/vespa/document/fieldvalue/weightedsetfieldvalue.cpp10
-rw-r--r--document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h6
-rw-r--r--document/src/vespa/document/update/addvalueupdate.cpp10
-rw-r--r--document/src/vespa/document/update/addvalueupdate.h6
-rw-r--r--document/src/vespa/document/update/assignvalueupdate.cpp14
-rw-r--r--document/src/vespa/document/update/assignvalueupdate.h9
-rw-r--r--document/src/vespa/document/update/fieldupdate.cpp2
-rw-r--r--document/src/vespa/document/update/fieldupdate.h4
-rw-r--r--document/src/vespa/document/update/removevalueupdate.cpp7
-rw-r--r--document/src/vespa/document/update/removevalueupdate.h5
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp5
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h1
-rw-r--r--eval/src/tests/eval/tensor_function/tensor_function_test.cpp1
-rw-r--r--eval/src/vespa/eval/eval/tensor_spec.cpp3
-rw-r--r--eval/src/vespa/eval/eval/tensor_spec.h2
-rw-r--r--eval/src/vespa/eval/eval/test/tensor_conformance.cpp1
18 files changed, 76 insertions, 32 deletions
diff --git a/configutil/src/lib/modelinspect.cpp b/configutil/src/lib/modelinspect.cpp
index fb728caced0..12a262bc6aa 100644
--- a/configutil/src/lib/modelinspect.cpp
+++ b/configutil/src/lib/modelinspect.cpp
@@ -1,14 +1,22 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <iostream>
#include "modelinspect.h"
#include <lib/tags.h>
#include <vespa/config/helper/configgetter.hpp>
-
+#include <iostream>
using configdefinitions::tagsContain;
using configdefinitions::upcase;
+ModelInspect::Flags::Flags()
+ : verbose(false), makeuri(false), tagfilt(false),
+ tagFilter()
+{}
+
+ModelInspect::Flags::Flags(const Flags &) = default;
+ModelInspect::Flags & ModelInspect::Flags::operator = (const Flags &) = default;
+ModelInspect::Flags::~Flags() { }
+
ModelInspect::ModelInspect(Flags flags, const config::ConfigUri uri, std::ostream &out)
: _cfg(), _flags(flags), _out(out)
{
diff --git a/configutil/src/lib/modelinspect.h b/configutil/src/lib/modelinspect.h
index b50ea04e197..53459e79164 100644
--- a/configutil/src/lib/modelinspect.h
+++ b/configutil/src/lib/modelinspect.h
@@ -12,10 +12,12 @@ public:
bool makeuri;
bool tagfilt;
std::vector<vespalib::string> tagFilter;
- Flags()
- : verbose(false), makeuri(false), tagfilt(false),
- tagFilter()
- {}
+ Flags();
+ Flags(const Flags &);
+ Flags & operator = (const Flags &);
+ Flags(Flags &&) = default;
+ Flags & operator = (Flags &&) = default;
+ ~Flags();
};
ModelInspect(Flags flags, const config::ConfigUri uri, std::ostream &out);
diff --git a/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.cpp b/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.cpp
index 2bb9c1f4bc4..7bf5f5350d3 100644
--- a/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.cpp
+++ b/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.cpp
@@ -29,12 +29,12 @@ WeightedSetFieldValue::WeightedSetFieldValue(const DataType &type)
: CollectionFieldValue(type),
_map_type(new MapDataType(getKeyType(type), *DataType::INT)),
_map(*_map_type),
- _altered(true) {
-}
+ _altered(true)
+{ }
-WeightedSetFieldValue::~WeightedSetFieldValue()
-{
-}
+WeightedSetFieldValue::WeightedSetFieldValue(const WeightedSetFieldValue &) = default;
+WeightedSetFieldValue & WeightedSetFieldValue::operator = (const WeightedSetFieldValue &) = default;
+WeightedSetFieldValue::~WeightedSetFieldValue() { }
void WeightedSetFieldValue::verifyKey(const FieldValue & v)
{
diff --git a/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h b/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h
index 28517f45aee..4d6be1fd35a 100644
--- a/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h
+++ b/document/src/vespa/document/fieldvalue/weightedsetfieldvalue.h
@@ -43,7 +43,11 @@ public:
* easier to create instances using field's getDataType().
*/
WeightedSetFieldValue(const DataType &wsetType);
- virtual ~WeightedSetFieldValue();
+ WeightedSetFieldValue(const WeightedSetFieldValue &);
+ WeightedSetFieldValue & operator = (const WeightedSetFieldValue &);
+ WeightedSetFieldValue(WeightedSetFieldValue &&) = default;
+ WeightedSetFieldValue & operator = (WeightedSetFieldValue &&) = default;
+ ~WeightedSetFieldValue();
void accept(FieldValueVisitor &visitor) override { visitor.visit(*this); }
void accept(ConstFieldValueVisitor &visitor) const override { visitor.visit(*this); }
diff --git a/document/src/vespa/document/update/addvalueupdate.cpp b/document/src/vespa/document/update/addvalueupdate.cpp
index 408657f40f9..910e3d7dd50 100644
--- a/document/src/vespa/document/update/addvalueupdate.cpp
+++ b/document/src/vespa/document/update/addvalueupdate.cpp
@@ -14,11 +14,17 @@ using vespalib::IllegalArgumentException;
using vespalib::IllegalStateException;
using vespalib::nbostream;
-namespace document
-{
+namespace document {
IMPLEMENT_IDENTIFIABLE(AddValueUpdate, ValueUpdate);
+AddValueUpdate:: AddValueUpdate(const FieldValue& value, int weight)
+ : ValueUpdate(),
+ _value(value.clone()),
+ _weight(weight)
+{}
+
+AddValueUpdate::~AddValueUpdate() { }
bool
AddValueUpdate::operator==(const ValueUpdate& other) const
{
diff --git a/document/src/vespa/document/update/addvalueupdate.h b/document/src/vespa/document/update/addvalueupdate.h
index 1180ba4fcf1..0130899bd7e 100644
--- a/document/src/vespa/document/update/addvalueupdate.h
+++ b/document/src/vespa/document/update/addvalueupdate.h
@@ -30,10 +30,8 @@ public:
* @param value The field value to add.
* @param weight The weight for the field value.
*/
- AddValueUpdate(const FieldValue& value, int weight = 1)
- : ValueUpdate(),
- _value(value.clone()),
- _weight(weight) {}
+ AddValueUpdate(const FieldValue& value, int weight = 1);
+ ~AddValueUpdate();
bool operator==(const ValueUpdate& other) const override;
diff --git a/document/src/vespa/document/update/assignvalueupdate.cpp b/document/src/vespa/document/update/assignvalueupdate.cpp
index dcadcbf279b..0538bec10e5 100644
--- a/document/src/vespa/document/update/assignvalueupdate.cpp
+++ b/document/src/vespa/document/update/assignvalueupdate.cpp
@@ -1,10 +1,10 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include "assignvalueupdate.h"
#include <vespa/document/base/field.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/repo/fixedtyperepo.h>
#include <vespa/document/serialization/vespadocumentdeserializer.h>
-#include <vespa/document/update/assignvalueupdate.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/util/exceptions.h>
@@ -12,11 +12,19 @@ using vespalib::IllegalArgumentException;
using vespalib::IllegalStateException;
using vespalib::nbostream;
-namespace document
-{
+namespace document {
IMPLEMENT_IDENTIFIABLE(AssignValueUpdate, ValueUpdate);
+AssignValueUpdate::AssignValueUpdate() : ValueUpdate(), _value() {}
+
+AssignValueUpdate::AssignValueUpdate(const FieldValue& value)
+ : ValueUpdate(),
+ _value(value.clone())
+{
+}
+AssignValueUpdate::~AssignValueUpdate() {}
+
// Declare content bits.
static const unsigned char CONTENT_HASVALUE = 0x01;
diff --git a/document/src/vespa/document/update/assignvalueupdate.h b/document/src/vespa/document/update/assignvalueupdate.h
index 3811bad42aa..e28c7124364 100644
--- a/document/src/vespa/document/update/assignvalueupdate.h
+++ b/document/src/vespa/document/update/assignvalueupdate.h
@@ -23,13 +23,10 @@ class AssignValueUpdate : public ValueUpdate {
public:
typedef std::unique_ptr<AssignValueUpdate> UP;
- AssignValueUpdate() : ValueUpdate(), _value() {}
+ AssignValueUpdate();
- AssignValueUpdate(const FieldValue& value)
- : ValueUpdate(),
- _value(value.clone())
- {
- }
+ AssignValueUpdate(const FieldValue& value);
+ ~AssignValueUpdate();
bool operator==(const ValueUpdate& other) const override;
diff --git a/document/src/vespa/document/update/fieldupdate.cpp b/document/src/vespa/document/update/fieldupdate.cpp
index 5a677488467..3141fdf3a4f 100644
--- a/document/src/vespa/document/update/fieldupdate.cpp
+++ b/document/src/vespa/document/update/fieldupdate.cpp
@@ -27,6 +27,8 @@ FieldUpdate::FieldUpdate(const DocumentTypeRepo& repo,
deserialize(repo, type, buffer, version);
}
+FieldUpdate::FieldUpdate(const FieldUpdate &) = default;
+FieldUpdate & FieldUpdate::operator = (const FieldUpdate &) = default;
FieldUpdate::~FieldUpdate() {}
bool
diff --git a/document/src/vespa/document/update/fieldupdate.h b/document/src/vespa/document/update/fieldupdate.h
index d0e4fd3235e..38a801f16bd 100644
--- a/document/src/vespa/document/update/fieldupdate.h
+++ b/document/src/vespa/document/update/fieldupdate.h
@@ -34,6 +34,10 @@ public:
typedef vespalib::CloneablePtr<FieldUpdate> CP;
FieldUpdate(const Field& field);
+ FieldUpdate(const FieldUpdate &);
+ FieldUpdate & operator = (const FieldUpdate &);
+ FieldUpdate(FieldUpdate &&) = default;
+ FieldUpdate & operator = (FieldUpdate &&) = default;
~FieldUpdate();
/**
diff --git a/document/src/vespa/document/update/removevalueupdate.cpp b/document/src/vespa/document/update/removevalueupdate.cpp
index 19e72e71e8a..e0575f600da 100644
--- a/document/src/vespa/document/update/removevalueupdate.cpp
+++ b/document/src/vespa/document/update/removevalueupdate.cpp
@@ -18,6 +18,13 @@ namespace document
IMPLEMENT_IDENTIFIABLE(RemoveValueUpdate, ValueUpdate);
+RemoveValueUpdate::RemoveValueUpdate(const FieldValue& key)
+ : ValueUpdate(),
+ _key(key.clone())
+{}
+
+RemoveValueUpdate::~RemoveValueUpdate() {}
+
bool
RemoveValueUpdate::operator==(const ValueUpdate& other) const
{
diff --git a/document/src/vespa/document/update/removevalueupdate.h b/document/src/vespa/document/update/removevalueupdate.h
index 42590104870..6db1903a6dd 100644
--- a/document/src/vespa/document/update/removevalueupdate.h
+++ b/document/src/vespa/document/update/removevalueupdate.h
@@ -24,9 +24,8 @@ public:
*
* @param value The identifier of the field value to update.
*/
- RemoveValueUpdate(const FieldValue& key)
- : ValueUpdate(),
- _key(key.clone()) {}
+ RemoveValueUpdate(const FieldValue& key);
+ ~RemoveValueUpdate();
bool operator==(const ValueUpdate& other) const override;
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp
index de0135a7af6..036e23c052b 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.cpp
@@ -7,7 +7,8 @@ namespace documentapi {
BatchDocumentUpdateReply::BatchDocumentUpdateReply()
: WriteDocumentReply(DocumentProtocol::REPLY_BATCHDOCUMENTUPDATE)
-{
-}
+{ }
+
+BatchDocumentUpdateReply::~BatchDocumentUpdateReply() {}
}
diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h
index 1464270c60a..13c5cd5b9d1 100644
--- a/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h
+++ b/documentapi/src/vespa/documentapi/messagebus/messages/batchdocumentupdatereply.h
@@ -19,6 +19,7 @@ public:
typedef std::shared_ptr<BatchDocumentUpdateReply> SP;
BatchDocumentUpdateReply();
+ ~BatchDocumentUpdateReply();
const std::vector<bool>& getDocumentsNotFound() const { return _documentsNotFound; }
std::vector<bool>& getDocumentsNotFound() { return _documentsNotFound; }
diff --git a/eval/src/tests/eval/tensor_function/tensor_function_test.cpp b/eval/src/tests/eval/tensor_function/tensor_function_test.cpp
index cfaef979ed0..39f73637749 100644
--- a/eval/src/tests/eval/tensor_function/tensor_function_test.cpp
+++ b/eval/src/tests/eval/tensor_function/tensor_function_test.cpp
@@ -20,6 +20,7 @@ struct EvalCtx : TensorFunction::Input {
std::map<size_t, Value::UP> tensors;
EvalCtx(const TensorEngine &engine_in)
: engine(engine_in), stash(), neg(), error(), tensors() {}
+ ~EvalCtx() { }
void add_tensor(std::unique_ptr<Tensor> tensor, size_t id) {
tensors.emplace(id, std::make_unique<TensorValue>(std::move(tensor)));
}
diff --git a/eval/src/vespa/eval/eval/tensor_spec.cpp b/eval/src/vespa/eval/eval/tensor_spec.cpp
index dfd8b06bb52..ac59f0d4424 100644
--- a/eval/src/vespa/eval/eval/tensor_spec.cpp
+++ b/eval/src/vespa/eval/eval/tensor_spec.cpp
@@ -12,6 +12,9 @@ TensorSpec::TensorSpec(const vespalib::string &type_spec)
_cells()
{ }
+TensorSpec::TensorSpec(const TensorSpec &) = default;
+TensorSpec & TensorSpec::operator = (const TensorSpec &) = default;
+
TensorSpec::~TensorSpec() { }
vespalib::string
diff --git a/eval/src/vespa/eval/eval/tensor_spec.h b/eval/src/vespa/eval/eval/tensor_spec.h
index 4f615d21906..268b870aab9 100644
--- a/eval/src/vespa/eval/eval/tensor_spec.h
+++ b/eval/src/vespa/eval/eval/tensor_spec.h
@@ -55,6 +55,8 @@ private:
Cells _cells;
public:
TensorSpec(const vespalib::string &type_spec);
+ TensorSpec(const TensorSpec &);
+ TensorSpec & operator = (const TensorSpec &);
~TensorSpec();
TensorSpec &add(const Address &address, double value) {
_cells.emplace(address, value);
diff --git a/eval/src/vespa/eval/eval/test/tensor_conformance.cpp b/eval/src/vespa/eval/eval/test/tensor_conformance.cpp
index 40366f39db9..2c18b513730 100644
--- a/eval/src/vespa/eval/eval/test/tensor_conformance.cpp
+++ b/eval/src/vespa/eval/eval/test/tensor_conformance.cpp
@@ -94,6 +94,7 @@ struct SkipNth : Mask {
struct Bits : Mask {
std::vector<bool> bits;
Bits(const std::vector<bool> &bits_in) : bits(bits_in) {}
+ ~Bits() { }
bool operator[](size_t i) const override {
ASSERT_LESS(i, bits.size());
return bits[i];