summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-03-01 13:12:41 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-03-08 21:38:36 +0000
commit72e9888bcccbc384d2485409ba055633131ed512 (patch)
tree79eb45091ead4ffeff40a1baf6cebe33edf7a9d4 /vespalib
parentfa93596f761848645b3ee133bfd665ece2cc06d6 (diff)
Specify destructors explicit to control inlining.
Conflicts: build_settings.cmake
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/data/simple_buffer.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/data/simple_buffer.h4
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/testkit/test_master.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/thread.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/thread.h6
-rw-r--r--vespalib/src/vespa/vespalib/util/time_tracker.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/time_tracker.h1
-rw-r--r--vespalib/src/vespa/vespalib/websocket/buffer.h2
-rw-r--r--vespalib/src/vespa/vespalib/websocket/request.cpp7
-rw-r--r--vespalib/src/vespa/vespalib/websocket/request.h2
11 files changed, 25 insertions, 8 deletions
diff --git a/vespalib/src/vespa/vespalib/data/simple_buffer.cpp b/vespalib/src/vespa/vespalib/data/simple_buffer.cpp
index a9bf80ac845..5e0f0a5f8e0 100644
--- a/vespalib/src/vespa/vespalib/data/simple_buffer.cpp
+++ b/vespalib/src/vespa/vespalib/data/simple_buffer.cpp
@@ -1,7 +1,7 @@
// Copyright 2017 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "simple_buffer.h"
+#include <cassert>
namespace vespalib {
@@ -11,6 +11,8 @@ SimpleBuffer::SimpleBuffer()
{
}
+SimpleBuffer::~SimpleBuffer() { }
+
Memory
SimpleBuffer::obtain()
{
diff --git a/vespalib/src/vespa/vespalib/data/simple_buffer.h b/vespalib/src/vespa/vespalib/data/simple_buffer.h
index ef3b6d284dc..631d5530cc8 100644
--- a/vespalib/src/vespa/vespalib/data/simple_buffer.h
+++ b/vespalib/src/vespa/vespalib/data/simple_buffer.h
@@ -4,7 +4,8 @@
#include "input.h"
#include "output.h"
-#include <ostream>
+#include <iosfwd>
+#include <vector>
namespace vespalib {
@@ -24,6 +25,7 @@ private:
public:
SimpleBuffer();
+ ~SimpleBuffer();
Memory obtain() override;
Input &evict(size_t bytes) override;
WritableMemory reserve(size_t bytes) override;
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.cpp b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
index 45906294a99..9bcadd03fd8 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.cpp
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.cpp
@@ -29,6 +29,8 @@ __thread TestMaster::ThreadState *TestMaster::_threadState = 0;
//-----------------------------------------------------------------------------
+TestMaster::TraceItem::~TraceItem() { }
+
TestMaster::ThreadState &
TestMaster::threadState(const vespalib::LockGuard &)
{
diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.h b/vespalib/src/vespa/vespalib/testkit/test_master.h
index 369b3ea918e..1148b1ebb09 100644
--- a/vespalib/src/vespa/vespalib/testkit/test_master.h
+++ b/vespalib/src/vespa/vespalib/testkit/test_master.h
@@ -39,6 +39,7 @@ public:
TraceItem(const std::string &file_in, uint32_t line_in,
const std::string &msg_in)
: file(file_in), line(line_in), msg(msg_in) {}
+ ~TraceItem();
};
private:
diff --git a/vespalib/src/vespa/vespalib/util/thread.cpp b/vespalib/src/vespa/vespalib/util/thread.cpp
index 8160e6d53a8..2170cc36db9 100644
--- a/vespalib/src/vespa/vespalib/util/thread.cpp
+++ b/vespalib/src/vespa/vespalib/util/thread.cpp
@@ -20,6 +20,8 @@ Thread::Proxy::Run(FastOS_ThreadInterface *, void *)
_currentThread = 0;
}
+Thread::Proxy::~Proxy() { }
+
Thread::Thread(Runnable &runnable)
: _proxy(*this, runnable),
_pool(STACK_SIZE, 1),
diff --git a/vespalib/src/vespa/vespalib/util/thread.h b/vespalib/src/vespa/vespalib/util/thread.h
index 96948462ab3..1a87b3bc576 100644
--- a/vespalib/src/vespa/vespalib/util/thread.h
+++ b/vespalib/src/vespa/vespalib/util/thread.h
@@ -27,8 +27,10 @@ private:
Proxy(Thread &parent, Runnable &target)
: thread(parent), runnable(target),
- start(), started(), cancel(false) {}
- virtual void Run(FastOS_ThreadInterface *thisThread, void *arguments);
+ start(), started(), cancel(false) { }
+ ~Proxy();
+
+ void Run(FastOS_ThreadInterface *thisThread, void *arguments) override;
};
Proxy _proxy;
diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.cpp b/vespalib/src/vespa/vespalib/util/time_tracker.cpp
index d8b1f8740a7..7bd863fc898 100644
--- a/vespalib/src/vespa/vespalib/util/time_tracker.cpp
+++ b/vespalib/src/vespa/vespalib/util/time_tracker.cpp
@@ -6,6 +6,8 @@
namespace vespalib {
+TimeTracker::Task::~Task() { }
+
TimeTracker::TimeTracker(uint32_t max_level_in)
: _tasks(),
_current_level(0),
diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.h b/vespalib/src/vespa/vespalib/util/time_tracker.h
index f31ba4305de..7719b3afc2f 100644
--- a/vespalib/src/vespa/vespalib/util/time_tracker.h
+++ b/vespalib/src/vespa/vespalib/util/time_tracker.h
@@ -18,6 +18,7 @@ private:
fastos::StopWatch task_time;
std::vector<Task> sub_tasks;
Task(const char *name_in) : name(name_in), task_time() { task_time.start(); }
+ ~Task();
void close_task() { task_time.stop(); }
double ms() const { return (task_time.elapsed().sec() * 1000.0); }
};
diff --git a/vespalib/src/vespa/vespalib/websocket/buffer.h b/vespalib/src/vespa/vespalib/websocket/buffer.h
index eee9085304a..934983bc737 100644
--- a/vespalib/src/vespa/vespalib/websocket/buffer.h
+++ b/vespalib/src/vespa/vespalib/websocket/buffer.h
@@ -3,8 +3,8 @@
#pragma once
-#include <memory>
#include <vespa/vespalib/stllike/string.h>
+#include <vector>
namespace vespalib {
namespace ws {
diff --git a/vespalib/src/vespa/vespalib/websocket/request.cpp b/vespalib/src/vespa/vespalib/websocket/request.cpp
index d894fdbbb3c..3bb08e9e5a7 100644
--- a/vespalib/src/vespa/vespalib/websocket/request.cpp
+++ b/vespalib/src/vespa/vespalib/websocket/request.cpp
@@ -1,9 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-#include <vespa/fastos/fastos.h>
#include "request.h"
-#include <algorithm>
+#include <cassert>
namespace vespalib {
namespace ws {
@@ -32,6 +30,9 @@ void split(vespalib::stringref str, vespalib::stringref sep,
} // namespace vespalib::ws::<unnamed>
+Request::Request() { }
+Request::~Request() { }
+
bool
Request::handle_header(vespalib::string &header_name,
const vespalib::string &header_line)
diff --git a/vespalib/src/vespa/vespalib/websocket/request.h b/vespalib/src/vespa/vespalib/websocket/request.h
index 2c08fb2abe0..8d7993ee372 100644
--- a/vespalib/src/vespa/vespalib/websocket/request.h
+++ b/vespalib/src/vespa/vespalib/websocket/request.h
@@ -24,6 +24,8 @@ private:
const vespalib::string &header_line);
public:
+ Request();
+ ~Request();
bool read_header(Connection &conn);
bool is_get() const { return _method == "GET"; }
const vespalib::string &get_header(const vespalib::string &name) const;