diff --git a/cql3/prepare_context.cc b/cql3/prepare_context.cc index 10366ec788..4990aa8b7b 100644 --- a/cql3/prepare_context.cc +++ b/cql3/prepare_context.cc @@ -58,8 +58,8 @@ size_t prepare_context::bound_variables_size() const { return _variable_names.size(); } -std::vector> prepare_context::get_variable_specifications() const & { - return std::vector>(_specs.begin(), _specs.end()); +const std::vector>& prepare_context::get_variable_specifications() const & { + return _specs; } std::vector> prepare_context::get_variable_specifications() && { diff --git a/cql3/prepare_context.hh b/cql3/prepare_context.hh index bb8cccfc94..d01049143d 100644 --- a/cql3/prepare_context.hh +++ b/cql3/prepare_context.hh @@ -86,7 +86,7 @@ public: size_t bound_variables_size() const; - std::vector> get_variable_specifications() const &; + const std::vector>& get_variable_specifications() const &; std::vector> get_variable_specifications() &&;