Skip to content

Commit

Permalink
Fix misc clang-tidy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jbytheway committed Dec 24, 2019
1 parent 095bd51 commit 44852dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions src/avatar_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,7 @@ class map
bool check_seen_cache( const tripoint &p ) const {
std::bitset<MAPSIZE_X *MAPSIZE_Y> &memory_seen_cache =
get_cache( p.z ).map_memory_seen_cache;
if( !memory_seen_cache[ static_cast<size_t>( p.x + p.y * MAPSIZE_Y ) ] ) {
return true;
}
return false;
return !memory_seen_cache[ static_cast<size_t>( p.x + p.y * MAPSIZE_Y ) ];
}
bool check_and_set_seen_cache( const tripoint &p ) const {
std::bitset<MAPSIZE_X *MAPSIZE_Y> &memory_seen_cache =
Expand Down

0 comments on commit 44852dc

Please sign in to comment.