From 4f0234a839125963c75809712326ba5b1c8801dd Mon Sep 17 00:00:00 2001 From: Victor Stewart Date: Mon, 24 Feb 2020 17:02:02 -0500 Subject: [PATCH] Update vector.h --- include/ulib/container/vector.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/ulib/container/vector.h b/include/ulib/container/vector.h index b6eb687b..4249e98e 100644 --- a/include/ulib/container/vector.h +++ b/include/ulib/container/vector.h @@ -1013,6 +1013,12 @@ public: UVector::move(source); // add to end and reset source } + + explicit UVector(const UVector& starting) : UVector(starting.size()) + { + U_TRACE_CTOR(0, UVector, "copy ctor") + this->copy(starting); + } ~UVector() { @@ -1320,7 +1326,7 @@ public: else UVector::sort(); } - void copy(UVector& source) + void copy(const UVector& source) { U_TRACE(0, "UVector::copy(%p)", &source)