From 44852dc2c24575ac261a97fe761129c8b56f3329 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Tue, 24 Dec 2019 17:05:23 -0500 Subject: [PATCH] Fix misc clang-tidy errors --- src/avatar_action.cpp | 4 +--- src/map.h | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index cf0bcd919f778..0bb4f6b0549e2 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -1018,9 +1018,7 @@ void avatar_action::plthrow( avatar &you, item_location loc, } // you must wield the item to throw it if( !you.is_wielding( *orig ) ) { - if( you.wield( *orig ) ) { - orig = &you.weapon; - } else { + if( !you.wield( *orig ) ) { return; } } diff --git a/src/map.h b/src/map.h index 46eb2974dc121..c769bd1042e22 100644 --- a/src/map.h +++ b/src/map.h @@ -268,10 +268,7 @@ class map bool check_seen_cache( const tripoint &p ) const { std::bitset &memory_seen_cache = get_cache( p.z ).map_memory_seen_cache; - if( !memory_seen_cache[ static_cast( p.x + p.y * MAPSIZE_Y ) ] ) { - return true; - } - return false; + return !memory_seen_cache[ static_cast( p.x + p.y * MAPSIZE_Y ) ]; } bool check_and_set_seen_cache( const tripoint &p ) const { std::bitset &memory_seen_cache =