summaryrefslogtreecommitdiffstats
path: root/include/framework/structure
diff options
context:
space:
mode:
Diffstat (limited to 'include/framework/structure')
-rw-r--r--include/framework/structure/BufferView.h26
1 files changed, 2 insertions, 24 deletions
diff --git a/include/framework/structure/BufferView.h b/include/framework/structure/BufferView.h
index d058714..47c7b9b 100644
--- a/include/framework/structure/BufferView.h
+++ b/include/framework/structure/BufferView.h
@@ -20,23 +20,10 @@ namespace de {
typedef std::_Bind<void (*(void*, long unsigned int))(void*, long unsigned int)> ReleaseFunction;
-static void noop_func(void *arg1, size_t arg2) {
- return;
-}
-
-constexpr auto noop_bind = std::bind(noop_func, (void*) nullptr, 0ul);
-
template <RecordInterface R>
class BufferView {
public:
- BufferView()
- : m_data(nullptr)
- , m_release(noop_bind)
- , m_head(0)
- , m_tail(0)
- , m_cap(0)
- , m_approx_ts_cnt(0)
- , m_tombstone_filter(nullptr) {}
+ BufferView() = default;
/*
* the BufferView's lifetime is tightly linked to buffer versioning, and so
@@ -54,17 +41,8 @@ public:
, m_approx_ts_cnt(std::exchange(other.m_approx_ts_cnt, 0))
, m_tombstone_filter(std::exchange(other.m_tombstone_filter, nullptr)) {}
- BufferView &operator=(BufferView &&other) noexcept {
- std::swap(m_data, other.m_data);
- m_release = std::move(other.m_release);
- std::swap(m_head, other.m_head);
- std::swap(m_tail, other.m_tail);
- std::swap(m_cap, other.m_cap);
- std::swap(m_approx_ts_cnt, other.m_approx_ts_cnt);
- std::swap(m_tombstone_filter, other.m_tombstone_filter);
+ BufferView &operator=(BufferView &&other) = delete;
- return *this;
- }
BufferView(Wrapped<R> *buffer, size_t cap, size_t head, size_t tail, size_t tombstone_cnt, psudb::BloomFilter<R> *filter,
ReleaseFunction release)