summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-06 11:26:44 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-05-06 11:26:44 +0000
commite260d3ecd2634359abdb2fe90578284ed1bc0fd6 (patch)
treeebfa2e406ae935769bc41c8e36982bc2562140f3 /vespalib
parent929b55c8c3cc4702d1e32711c8943c8e3c949505 (diff)
Prefer std::vector over vespalib::Array
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/util/arrayref.h3
-rw-r--r--vespalib/src/vespa/vespalib/util/small_vector.h4
2 files changed, 1 insertions, 6 deletions
diff --git a/vespalib/src/vespa/vespalib/util/arrayref.h b/vespalib/src/vespa/vespalib/util/arrayref.h
index cbfea3c21bd..88dc501370c 100644
--- a/vespalib/src/vespa/vespalib/util/arrayref.h
+++ b/vespalib/src/vespa/vespalib/util/arrayref.h
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include "array.h"
#include "small_vector.h"
#include <vector>
@@ -20,7 +19,6 @@ public:
ArrayRef(std::vector<T, A> & v) noexcept : _v(v.data()), _sz(v.size()) { }
template<size_t N>
ArrayRef(SmallVector<T, N> &v) noexcept : _v(v.data()), _sz(v.size()) { }
- ArrayRef(Array<T> &v) noexcept : _v(v.data()), _sz(v.size()) { }
T & operator [] (size_t i) noexcept { return _v[i]; }
const T & operator [] (size_t i) const noexcept { return _v[i]; }
T * data() noexcept { return _v; }
@@ -43,7 +41,6 @@ public:
template<size_t N>
ConstArrayRef(const SmallVector<T, N> &v) noexcept : _v(v.data()), _sz(v.size()) { }
ConstArrayRef(const ArrayRef<T> & v) noexcept : _v(v.data()), _sz(v.size()) { }
- ConstArrayRef(const Array<T> &v) noexcept : _v(v.data()), _sz(v.size()) { }
constexpr ConstArrayRef() noexcept : _v(nullptr), _sz(0) {}
const T & operator [] (size_t i) const noexcept { return _v[i]; }
[[nodiscard]] size_t size() const noexcept { return _sz; }
diff --git a/vespalib/src/vespa/vespalib/util/small_vector.h b/vespalib/src/vespa/vespalib/util/small_vector.h
index 54711623440..cf9910e24b5 100644
--- a/vespalib/src/vespa/vespalib/util/small_vector.h
+++ b/vespalib/src/vespa/vespalib/util/small_vector.h
@@ -4,10 +4,8 @@
#include "alloc.h"
#include "traits.h"
-#include <string.h>
-#include <cstdint>
+#include <cstring>
#include <cassert>
-#include <memory>
#include <iterator>
namespace vespalib {