Skip to content

Commit

Permalink
Get rid of unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrikLundell committed Aug 5, 2024
1 parent 2b2dc8c commit 7401c86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -2195,10 +2195,8 @@ class map
// Rotates the current map 90*turns degrees clockwise
// Useful for houses, shops, etc
// @param turns number of 90 clockwise turns to make
// @param setpos_safe if true, being used outside of mapgen and can use setpos to
// set NPC positions. if false, cannot use setpos
// Note that this operation actually only works on tinymap and smallmap.
void rotate( int turns, bool setpos_safe = false );
void rotate( int turns );

// Not protected/private for mapgen.cpp access
// Mirrors the current map horizontally and/or vertically (both is technically
Expand Down
6 changes: 3 additions & 3 deletions src/mapgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7108,7 +7108,7 @@ computer *map::add_computer( const tripoint &p, const std::string &name, int sec
* degrees.
* @param turns How many 90-degree turns to rotate the map.
*/
void map::rotate( int turns, const bool setpos_safe )
void map::rotate( int turns )
{
if( this->my_MAPSIZE != 2 ) {
debugmsg( "map::rotate called with map too large to be rotated properly. Only the top left overmap will be rotated." );
Expand Down Expand Up @@ -8036,15 +8036,15 @@ class rotation_guard
// If the existing map is rotated, we need to rotate it back to the north
// orientation before applying our updates.
if( rotation != 0 && !md.has_flag( jmapgen_flags::no_underlying_rotate ) ) {
md.m.rotate( rotation, true );
md.m.rotate( rotation );
}
}

~rotation_guard() {
// If we rotated the map before applying updates, we now need to rotate
// it back to where we found it.
if( rotation != 0 && !md.has_flag( jmapgen_flags::no_underlying_rotate ) ) {
md.m.rotate( 4 - rotation, true );
md.m.rotate( 4 - rotation );
}
}
private:
Expand Down

0 comments on commit 7401c86

Please sign in to comment.