Skip to content

Commit 703a6fb

Browse files
committed
std: add missing const
1 parent f501442 commit 703a6fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/eigenpy/std-vector.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ struct contains_algo;
342342
template <typename T>
343343
struct contains_algo<T, true> {
344344
template <class Container, typename key_type>
345-
static bool run(Container &container, key_type const &key) {
345+
static bool run(const Container &container, key_type const &key) {
346346
return std::find(container.begin(), container.end(), key) !=
347347
container.end();
348348
}
@@ -351,7 +351,7 @@ struct contains_algo<T, true> {
351351
template <typename T>
352352
struct contains_algo<T, false> {
353353
template <class Container, typename key_type>
354-
static bool run(Container &container, key_type const &key) {
354+
static bool run(const Container &container, key_type const &key) {
355355
for (size_t k = 0; k < container.size(); ++k) {
356356
if (&container[k] == &key) return true;
357357
}

0 commit comments

Comments
 (0)