Skip to content

Commit

Permalink
#5729: Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Aug 27, 2021
1 parent 5cef777 commit fad4eef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions radiantcore/map/Map.cpp
Expand Up @@ -877,12 +877,12 @@ void Map::saveMapCopyAs(const cmd::ArgumentList& args)
if (args.size() == 0 || args[0].getString().empty())
{
// Use the overload without arguments, it will ask for a file name
GlobalMap().saveCopyAs();
saveCopyAs();
}
else
{
// Pass the first argument we got
GlobalMap().saveCopyAs(args[0].getString());
saveCopyAs(args[0].getString());
}
}

Expand All @@ -901,7 +901,7 @@ void Map::registerCommands()
GlobalCommandSystem().addCommand("SaveSelectedAsPrefab", Map::saveSelectedAsPrefab);
GlobalCommandSystem().addCommand("SaveMap", std::bind(&Map::saveMapCmd, this, std::placeholders::_1));
GlobalCommandSystem().addCommand("SaveMapAs", Map::saveMapAs);
GlobalCommandSystem().addCommand("SaveMapCopyAs", Map::saveMapCopyAs, { cmd::ARGTYPE_STRING | cmd::ARGTYPE_OPTIONAL });
GlobalCommandSystem().addCommand("SaveMapCopyAs", std::bind(&Map::saveMapCopyAs, this, std::placeholders::_1), { cmd::ARGTYPE_STRING | cmd::ARGTYPE_OPTIONAL });
GlobalCommandSystem().addCommand("ExportMap", Map::exportMap);
GlobalCommandSystem().addCommand("SaveSelected", Map::exportSelection);
GlobalCommandSystem().addCommand("ReloadSkins", map::algorithm::reloadSkins);
Expand Down
2 changes: 1 addition & 1 deletion radiantcore/map/Map.h
Expand Up @@ -218,7 +218,7 @@ class Map :
/** greebo: Queries a filename from the user and saves a copy
* of the current map to the specified filename.
*/
static void saveMapCopyAs(const cmd::ArgumentList& args);
void saveMapCopyAs(const cmd::ArgumentList& args);

/** greebo: Asks the user for the .pfb file and exports the file/selection
*/
Expand Down

0 comments on commit fad4eef

Please sign in to comment.