From 03e2ca7a54b48f42d25e08aacafe2745ba6927a6 Mon Sep 17 00:00:00 2001 From: ehughsbaird <44244083+ehughsbaird@users.noreply.github.com> Date: Tue, 25 Jun 2024 04:44:19 +0000 Subject: [PATCH] Silence erroneous clang-tidy warning --- src/map.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/map.cpp b/src/map.cpp index 4421c85a0f7b1..511b5d33a93c5 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -5245,6 +5245,9 @@ item &map::add_item_or_charges( const tripoint &pos, item obj, int &copies_remai return *_add_item_or_charges( pos, std::move( obj ), copies_remaining, overflow ).first; } +// clang-tidy is confused and thinks obj can be made into a const reference, but it can't +// on_drop is not a const function +// NOLINTNEXTLINE(performance-unnecessary-value-param) std::pair map::_add_item_or_charges( const tripoint &pos, item obj, int &copies_remaining, bool overflow ) {