summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-03-02 02:00:41 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-03-08 21:38:37 +0000
commitbe9df8bfa22cf5a7164f4f3deba44cdbd2b8e7cf (patch)
treef4a9153a9613f375f3a7dc15fb274a528a1269ed /vdslib
parent72e9888bcccbc384d2485409ba055633131ed512 (diff)
Implement a default destructor to avoid the automatic inlining of large destructors.
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/vespa/vdslib/container/documentsummary.cpp2
-rw-r--r--vdslib/src/vespa/vdslib/container/documentsummary.h2
-rw-r--r--vdslib/src/vespa/vdslib/container/searchresult.cpp6
-rw-r--r--vdslib/src/vespa/vdslib/container/searchresult.h2
-rw-r--r--vdslib/src/vespa/vdslib/state/nodestate.cpp6
-rw-r--r--vdslib/src/vespa/vdslib/state/nodestate.h6
6 files changed, 22 insertions, 2 deletions
diff --git a/vdslib/src/vespa/vdslib/container/documentsummary.cpp b/vdslib/src/vespa/vdslib/container/documentsummary.cpp
index 3c0ff157fc3..fcb687179f0 100644
--- a/vdslib/src/vespa/vdslib/container/documentsummary.cpp
+++ b/vdslib/src/vespa/vdslib/container/documentsummary.cpp
@@ -20,6 +20,8 @@ DocumentSummary::DocumentSummary(document::ByteBuffer& buf) :
deserialize(buf);
}
+DocumentSummary::~DocumentSummary() {}
+
void DocumentSummary::deserialize(document::ByteBuffer& buf)
{
int32_t tmp;
diff --git a/vdslib/src/vespa/vdslib/container/documentsummary.h b/vdslib/src/vespa/vdslib/container/documentsummary.h
index 2b97a90ae1d..a14082d1ca6 100644
--- a/vdslib/src/vespa/vdslib/container/documentsummary.h
+++ b/vdslib/src/vespa/vdslib/container/documentsummary.h
@@ -10,6 +10,8 @@ namespace vdslib {
class DocumentSummary {
public:
DocumentSummary();
+ ~DocumentSummary();
+
/**
* Constructs a new message from a byte buffer.
diff --git a/vdslib/src/vespa/vdslib/container/searchresult.cpp b/vdslib/src/vespa/vdslib/container/searchresult.cpp
index a6c71c3d9e3..7a627a34095 100644
--- a/vdslib/src/vespa/vdslib/container/searchresult.cpp
+++ b/vdslib/src/vespa/vdslib/container/searchresult.cpp
@@ -50,7 +50,9 @@ BlobContainer::BlobContainer(size_t reserve) :
_offsets.push_back(0);
}
-size_t BlobContainer::BlobContainer::append(const void * v, size_t sz)
+BlobContainer::~BlobContainer() {}
+
+size_t BlobContainer::append(const void * v, size_t sz)
{
const size_t index(getCount());
_offsets.push_back(_offsets.back() + sz);
@@ -113,6 +115,8 @@ SearchResult::SearchResult(document::ByteBuffer & buf) :
deserialize(buf);
}
+SearchResult::~SearchResult() {}
+
void SearchResult::deserialize(document::ByteBuffer & buf)
{
int32_t tmp;
diff --git a/vdslib/src/vespa/vdslib/container/searchresult.h b/vdslib/src/vespa/vdslib/container/searchresult.h
index 7d19c97122a..9cdb85b3c89 100644
--- a/vdslib/src/vespa/vdslib/container/searchresult.h
+++ b/vdslib/src/vespa/vdslib/container/searchresult.h
@@ -23,6 +23,7 @@ class BlobContainer
{
public:
BlobContainer(size_t reserve=4096);
+ ~BlobContainer();
size_t append(const void * v, size_t sz);
void getBlob(size_t index, const void * & blob, size_t & sz) const;
size_t getCount() const { return _offsets.size() - 1; }
@@ -50,6 +51,7 @@ public:
* @param buf A byte buffer that contains a serialized message.
*/
SearchResult(document::ByteBuffer & buf);
+ ~SearchResult();
AggregatorList & getGroupingList() { return _groupingList; }
const AggregatorList & getGroupingList() const { return _groupingList; }
diff --git a/vdslib/src/vespa/vdslib/state/nodestate.cpp b/vdslib/src/vespa/vdslib/state/nodestate.cpp
index 53be2a8da1d..d4fdfb35993 100644
--- a/vdslib/src/vespa/vdslib/state/nodestate.cpp
+++ b/vdslib/src/vespa/vdslib/state/nodestate.cpp
@@ -17,6 +17,12 @@ LOG_SETUP(".vdslib.nodestate");
namespace storage {
namespace lib {
+NodeState::NodeState(const NodeState &) = default;
+NodeState & NodeState::operator = (const NodeState &) = default;
+NodeState::NodeState(NodeState &&) = default;
+NodeState & NodeState::operator = (NodeState &&) = default;
+NodeState::~NodeState() { }
+
NodeState::NodeState()
: _type(0),
_state(0),
diff --git a/vdslib/src/vespa/vdslib/state/nodestate.h b/vdslib/src/vespa/vdslib/state/nodestate.h
index e9b7de56851..275e8d5658c 100644
--- a/vdslib/src/vespa/vdslib/state/nodestate.h
+++ b/vdslib/src/vespa/vdslib/state/nodestate.h
@@ -43,12 +43,16 @@ public:
static double getListingBucketsInitProgressLimit() { return 0.01; }
NodeState();
+ NodeState(const NodeState &);
+ NodeState & operator = (const NodeState &);
+ NodeState(NodeState &&);
+ NodeState & operator = (NodeState &&);
NodeState(const NodeType& nodeType, const State&,
const vespalib::stringref & description = "",
double capacity = 1.0, uint16_t reliability = 1);
/** Set type if you want to verify that content fit with the given type. */
NodeState(const vespalib::stringref & serialized, const NodeType* nodeType = 0);
- virtual ~NodeState() {}
+ ~NodeState();
/**
* Setting prefix to something implies using this function to write a