From b027b60be04071b28eaf90162e6c991e22bd140d Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Mon, 14 Nov 2016 21:29:43 +1100 Subject: [PATCH] view: find function takes const ref --- view.hpp | 2 +- view.ipp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/view.hpp b/view.hpp index efe06a8f..2c3775c0 100644 --- a/view.hpp +++ b/view.hpp @@ -44,7 +44,7 @@ namespace util { constexpr const T& cbegin (void) const noexcept; constexpr const T& cend (void) const noexcept; - constexpr T find (value_type) const noexcept; + constexpr T find (const value_type&) const noexcept; constexpr bool empty (void) const noexcept; constexpr size_t size (void) const noexcept; diff --git a/view.ipp b/view.ipp index 60a345c3..9406a9b0 100644 --- a/view.ipp +++ b/view.ipp @@ -111,7 +111,7 @@ util::view::cend (void) const noexcept /////////////////////////////////////////////////////////////////////////////// template constexpr T -util::view::find (value_type v) const noexcept +util::view::find (const value_type &v) const noexcept { for (T i = cbegin (); i != cend (); ++i) if (*i == v)