Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually different parameters, obliviating the need for bit-packing.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "hotkeys.h"
|
||||
#include "transparency.h"
|
||||
#include "gui.h"
|
||||
#include "signs_cmd.h"
|
||||
|
||||
#include "widgets/sign_widget.h"
|
||||
|
||||
@@ -413,7 +414,7 @@ Window *ShowSignList()
|
||||
static bool RenameSign(SignID index, const char *text)
|
||||
{
|
||||
bool remove = StrEmpty(text);
|
||||
DoCommandP(CMD_RENAME_SIGN, StrEmpty(text) ? STR_ERROR_CAN_T_DELETE_SIGN : STR_ERROR_CAN_T_CHANGE_SIGN_NAME, 0, index, 0, text);
|
||||
Command<CMD_RENAME_SIGN>::Post(StrEmpty(text) ? STR_ERROR_CAN_T_DELETE_SIGN : STR_ERROR_CAN_T_CHANGE_SIGN_NAME, 0, index, 0, text);
|
||||
return remove;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user