Strip trailing whitespaces

This commit is contained in:
mattsc 2013-11-25 19:55:06 -08:00
parent f3535c3a4f
commit 5935ba22df
2 changed files with 20 additions and 20 deletions

View file

@ -287,17 +287,17 @@ static void jbutton_event_execute(display& disp, const SDL_JoyButtonEvent& event
static void jhat_event_execute(display& disp, const SDL_JoyHatEvent& event, command_executor* executor);
static void mbutton_event_execute(display& disp, const SDL_MouseButtonEvent& event, command_executor* executor);
scope hotkey_item::get_scope() const
scope hotkey_item::get_scope() const
{
return hotkey::get_hotkey_command(get_command()).scope;
}
HOTKEY_COMMAND hotkey_item::get_id() const
HOTKEY_COMMAND hotkey_item::get_id() const
{
return hotkey::get_id(get_command());
}
hotkey_command& hotkey_item::get_hotkey_command() const
hotkey_command& hotkey_item::get_hotkey_command() const
{
return hotkey::get_hotkey_command(get_command());
}
@ -312,7 +312,7 @@ bool hotkey_item::valid() const
return (character_ | keycode_ | joystick_ | mouse_ | button_ | hat_ | value_) != 0;
}
const std::string hotkey_item::get_description() const
const std::string hotkey_item::get_description() const
{
return hotkey::get_description(get_command());
}
@ -639,12 +639,12 @@ void save_hotkey(config& cfg, const hotkey_item & item)
item.save(cfg.add_child("hotkey"));
}
const std::string get_description(const std::string& command)
const std::string get_description(const std::string& command)
{
return get_hotkey_command(command).description;
}
const std::string get_tooltip(const std::string& command)
const std::string get_tooltip(const std::string& command)
{
// the null hotkey_command has the "" tooltip
return get_hotkey_command(command).tooltip;
@ -689,7 +689,7 @@ hotkey_command& hotkey_command::get_command_by_command(hotkey::HOTKEY_COMMAND co
if(cmd.id == command)
return cmd;
}
ERR_G << " \"get_command_by_command\" returned get_hotkey_null() because no hotkey_command had the requested number:" << command;
ERR_G << " \"get_command_by_command\" returned get_hotkey_null() because no hotkey_command had the requested number:" << command;
return get_hotkey_null();
}
@ -805,7 +805,7 @@ void add_wml_hotkey(const std::string& id, const t_string& description, const co
hotkey_command& get_hotkey_command(const std::string& command)
{
if (command_map_.find(command) == command_map_.end())
if (command_map_.find(command) == command_map_.end())
{
return get_hotkey_null();
}
@ -813,7 +813,7 @@ hotkey_command& get_hotkey_command(const std::string& command)
return known_hotkeys[command_map_[command]];
}
HOTKEY_COMMAND get_id(const std::string& command)
HOTKEY_COMMAND get_id(const std::string& command)
{
return get_hotkey_command(command).id;
}

View file

@ -143,7 +143,7 @@ enum HOTKEY_COMMAND {
TITLE_SCREEN__CREDITS,
GLOBAL__HELPTIP,
HOTKEY_WML,
HOTKEY_WML,
HOTKEY_NULL
};
@ -165,7 +165,7 @@ struct input_controll {
/// Stores all information related to functions that can be bound to hotkeys.
/// this is currently a semi struct: it haves a constructor, but only const-public members.
/// this is currently a semi struct: it haves a constructor, but only const-public members.
struct hotkey_command {
public:
/// the compiler want me to make a default constructor
@ -186,12 +186,12 @@ public:
const hotkey::scope scope;
const t_string tooltip;
/// checks weather this is the null hotkey_command
bool null() const;
/// returns the command that is treated as null
static hotkey_command& null_command();
/// the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command,
/// the execute_command argument was changed from HOTKEY_COMMAND to hotkey_command,
/// to be able to call it with HOTKEY_COMMAND, this function was created
static hotkey_command& get_command_by_command(HOTKEY_COMMAND command);
};
@ -199,15 +199,15 @@ public:
/// hotkey_command uses t_string wich might cause bugs when used at progamm startup, so use this for the hotkey_list_ (and only there).
struct hotkey_command_temp {
hotkey::HOTKEY_COMMAND id;
const char* command;
/// description, tooltip are untranslated
const char* description;
bool hidden;
hotkey::scope scope;
const char* tooltip;
};
@ -257,9 +257,9 @@ public:
std::string get_name() const;
void clear();
bool null() const { return command_ == "null"; };
/// retruns weather there is a associated hotkey_command.
// if the none of the hotkey_commands fits this hotkey_item then get_hotkey_command will return the hotkey_command::null_command().
bool active() const;
@ -370,7 +370,7 @@ bool remove_wml_hotkey(const std::string& id);
/// returns the hotkey_command that is treated as null.
hotkey_command& get_hotkey_null();
///
///
bool has_hotkey_command(const std::string& id);
/// inicated weather there is at least one hotkey_item with the given command
bool has_hotkey_item(const std::string& command);