Skip to content

Commit

Permalink
fix(autoware_pointcloud_preprocessor): fix passedByValue (autowarefou…
Browse files Browse the repository at this point in the history
…ndation#8242)

fix:passedByValue

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
  • Loading branch information
kobayu858 authored and kyoichi-sugahara committed Aug 5, 2024
1 parent 881ece6 commit 9ced965
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ class Table
}

template <typename... Args>
iterator emplace_hint(const_iterator position, Args &&... args)
iterator emplace_hint(const const_iterator & position, Args &&... args)
{
(void)position;
return emplace(std::forward<Args>(args)...).first;
Expand All @@ -1951,14 +1951,14 @@ class Table
}

template <typename... Args>
iterator try_emplace(const_iterator hint, const key_type & key, Args &&... args)
iterator try_emplace(const const_iterator & hint, const key_type & key, Args &&... args)
{
(void)hint;
return try_emplace_impl(key, std::forward<Args>(args)...).first;
}

template <typename... Args>
iterator try_emplace(const_iterator hint, key_type && key, Args &&... args)
iterator try_emplace(const const_iterator & hint, key_type && key, Args &&... args)
{
(void)hint;
return try_emplace_impl(std::move(key), std::forward<Args>(args)...).first;
Expand All @@ -1977,14 +1977,14 @@ class Table
}

template <typename Mapped>
iterator insert_or_assign(const_iterator hint, const key_type & key, Mapped && obj)
iterator insert_or_assign(const const_iterator & hint, const key_type & key, Mapped && obj)
{
(void)hint;
return insertOrAssignImpl(key, std::forward<Mapped>(obj)).first;
}

template <typename Mapped>
iterator insert_or_assign(const_iterator hint, key_type && key, Mapped && obj)
iterator insert_or_assign(const const_iterator & hint, key_type && key, Mapped && obj)
{
(void)hint;
return insertOrAssignImpl(std::move(key), std::forward<Mapped>(obj)).first;
Expand All @@ -1996,15 +1996,15 @@ class Table
return emplace(keyval);
}

iterator insert(const_iterator hint, const value_type & keyval)
iterator insert(const const_iterator & hint, const value_type & keyval)
{
(void)hint;
return emplace(keyval).first;
}

std::pair<iterator, bool> insert(value_type && keyval) { return emplace(std::move(keyval)); }

iterator insert(const_iterator hint, value_type && keyval)
iterator insert(const const_iterator & hint, value_type && keyval)
{
(void)hint;
return emplace(std::move(keyval)).first;
Expand Down

0 comments on commit 9ced965

Please sign in to comment.