diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-03-02 02:00:41 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-03-08 21:38:37 +0000 |
commit | be9df8bfa22cf5a7164f4f3deba44cdbd2b8e7cf (patch) | |
tree | f4a9153a9613f375f3a7dc15fb274a528a1269ed /document | |
parent | 72e9888bcccbc384d2485409ba055633131ed512 (diff) |
Implement a default destructor to avoid the automatic inlining of large destructors.
Diffstat (limited to 'document')
10 files changed, 37 insertions, 6 deletions
diff --git a/document/src/vespa/document/annotation/spannode.cpp b/document/src/vespa/document/annotation/spannode.cpp index 5feaffd8656..1b0ee71cc15 100644 --- a/document/src/vespa/document/annotation/spannode.cpp +++ b/document/src/vespa/document/annotation/spannode.cpp @@ -11,7 +11,8 @@ namespace { class ToStringVisitor : public SpanTreeVisitor { public: - ToStringVisitor() : _os(), _indent() { } + ToStringVisitor(); + ~ToStringVisitor(); vespalib::stringref str() const { return _os.str(); } private: vespalib::asciistream _os; @@ -79,6 +80,9 @@ private: } }; +ToStringVisitor::ToStringVisitor() : _os(), _indent() { } +ToStringVisitor::~ToStringVisitor() { } + } vespalib::string diff --git a/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp b/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp index 04580f906fa..9793184aa0f 100644 --- a/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/stringfieldvalue.cpp @@ -26,6 +26,8 @@ StringFieldValue::StringFieldValue(const StringFieldValue & rhs) : { } +StringFieldValue::~StringFieldValue() {} + StringFieldValue & StringFieldValue::operator=(const StringFieldValue & rhs) { if (&rhs != this) { diff --git a/document/src/vespa/document/fieldvalue/stringfieldvalue.h b/document/src/vespa/document/fieldvalue/stringfieldvalue.h index bb3c8ddf9d5..b1690a2245a 100644 --- a/document/src/vespa/document/fieldvalue/stringfieldvalue.h +++ b/document/src/vespa/document/fieldvalue/stringfieldvalue.h @@ -30,6 +30,7 @@ public: StringFieldValue &operator=(const StringFieldValue &rhs); StringFieldValue &operator=(const vespalib::stringref &value) override; + ~StringFieldValue(); FieldValue &assign(const FieldValue &) override; diff --git a/document/src/vespa/document/select/valuenode.cpp b/document/src/vespa/document/select/valuenode.cpp index 2138b8eac41..54ab19f3087 100644 --- a/document/src/vespa/document/select/valuenode.cpp +++ b/document/src/vespa/document/select/valuenode.cpp @@ -1,15 +1,15 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "valuenode.h" #include "visitor.h" - -#include <iomanip> -#include <vespa/document/base/exceptions.h> #include "parser.h" +#include <vespa/document/base/exceptions.h> #include <vespa/document/fieldvalue/fieldvalues.h> #include <vespa/vespalib/util/md5.h> #include <vespa/document/util/stringutil.h> #include <vespa/vespalib/text/lowercase.h> #include <regex> +#include <iomanip> + #include <vespa/log/log.h> LOG_SETUP(".document.select.valuenode"); @@ -263,6 +263,9 @@ FieldValueNode::getValue(const Context& context) const } } +FieldValueNode::IteratorHandler::IteratorHandler() { } +FieldValueNode::IteratorHandler::~IteratorHandler() { } + bool FieldValueNode::IteratorHandler::hasSingleValue() const { return _firstValue.get() && (_values.size() == 0); diff --git a/document/src/vespa/document/select/valuenode.h b/document/src/vespa/document/select/valuenode.h index 60d0e3afbb3..cbbc77f8818 100644 --- a/document/src/vespa/document/select/valuenode.h +++ b/document/src/vespa/document/select/valuenode.h @@ -269,6 +269,8 @@ private: class IteratorHandler : public FieldValue::IteratorHandler { public: + IteratorHandler(); + ~IteratorHandler(); bool hasSingleValue() const; std::unique_ptr<Value> getSingleValue(); diff --git a/document/src/vespa/document/serialization/CMakeLists.txt b/document/src/vespa/document/serialization/CMakeLists.txt index e17e4a735e4..212e640b2d8 100644 --- a/document/src/vespa/document/serialization/CMakeLists.txt +++ b/document/src/vespa/document/serialization/CMakeLists.txt @@ -3,6 +3,7 @@ vespa_add_library(document_serialization OBJECT SOURCES annotationdeserializer.cpp annotationserializer.cpp + slime_output_to_vector.cpp vespadocumentserializer.cpp vespadocumentdeserializer.cpp DEPENDS diff --git a/document/src/vespa/document/serialization/slime_output_to_vector.cpp b/document/src/vespa/document/serialization/slime_output_to_vector.cpp new file mode 100644 index 00000000000..210f36e43bc --- /dev/null +++ b/document/src/vespa/document/serialization/slime_output_to_vector.cpp @@ -0,0 +1,14 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include "slime_output_to_vector.h" + +namespace document { + +SlimeOutputToVector::SlimeOutputToVector() + : _buf(), + _size(0) +{ } + +SlimeOutputToVector::~SlimeOutputToVector() { } + +} diff --git a/document/src/vespa/document/serialization/slime_output_to_vector.h b/document/src/vespa/document/serialization/slime_output_to_vector.h index ae95accdd79..eac460d062f 100644 --- a/document/src/vespa/document/serialization/slime_output_to_vector.h +++ b/document/src/vespa/document/serialization/slime_output_to_vector.h @@ -13,7 +13,8 @@ class SlimeOutputToVector : public vespalib::Output { size_t _size; public: - SlimeOutputToVector() : _buf(), _size(0) {} + SlimeOutputToVector(); + ~SlimeOutputToVector(); vespalib::WritableMemory reserve(size_t reserve) { if (_size + reserve > _buf.size()) { diff --git a/document/src/vespa/document/update/fieldupdate.cpp b/document/src/vespa/document/update/fieldupdate.cpp index e932d985056..5a677488467 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() {} + bool FieldUpdate::operator==(const FieldUpdate& other) const { diff --git a/document/src/vespa/document/update/fieldupdate.h b/document/src/vespa/document/update/fieldupdate.h index 14766af57e1..d47e5579a31 100644 --- a/document/src/vespa/document/update/fieldupdate.h +++ b/document/src/vespa/document/update/fieldupdate.h @@ -13,8 +13,8 @@ */ #pragma once +#include "valueupdate.h" #include <vespa/document/base/field.h> -#include <vespa/document/update/valueupdate.h> #include <vespa/document/util/serializable.h> namespace document { @@ -34,6 +34,7 @@ public: typedef vespalib::CloneablePtr<FieldUpdate> CP; FieldUpdate(const Field& field); + ~FieldUpdate(); /** * This is a convenience function to construct a field update directly from |