mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Code cleanup: remove messy spaces before line continuation (\) in macros
This commit is contained in:
@@ -390,11 +390,11 @@ bool CardsPanel::wantsToHandle(const Action&, bool undone) const {
|
||||
// ----------------------------------------------------------------------------- : Clipboard
|
||||
|
||||
// determine what control to use for clipboard actions
|
||||
#define CUT_COPY_PASTE(op,return) \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_EDITOR) { return editor->op(); } \
|
||||
else if (id == ID_CARD_LIST) { return card_list->op(); } \
|
||||
else if (id == ID_NOTES) { return notes->op(); } \
|
||||
#define CUT_COPY_PASTE(op,return) \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_EDITOR) { return editor->op(); } \
|
||||
else if (id == ID_CARD_LIST) { return card_list->op(); } \
|
||||
else if (id == ID_NOTES) { return notes->op(); } \
|
||||
else { return false; }
|
||||
|
||||
bool CardsPanel::canCut() const { CUT_COPY_PASTE(canCut, return) }
|
||||
|
||||
@@ -533,9 +533,9 @@ END_EVENT_TABLE ()
|
||||
// ----------------------------------------------------------------------------- : Clipboard
|
||||
|
||||
// determine what control to use for clipboard actions
|
||||
#define CUT_COPY_PASTE(op,return) \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_MESSAGE_LIST) { return messages->op(); } \
|
||||
#define CUT_COPY_PASTE(op,return) \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_MESSAGE_LIST) { return messages->op(); } \
|
||||
else { return false; }
|
||||
|
||||
bool ConsolePanel::canCut() const { return false; }
|
||||
|
||||
@@ -260,15 +260,15 @@ String KeywordsPanel::runRefScript(int find_i) {
|
||||
// ----------------------------------------------------------------------------- : Clipboard
|
||||
|
||||
// determine what control to use for clipboard actions
|
||||
#define CUT_COPY_PASTE(op,return,check) \
|
||||
if (!isInitialized()) return false; \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_KEYWORD_LIST && keyword ->IsEnabled()) { return list ->op(); } \
|
||||
#define CUT_COPY_PASTE(op,return,check) \
|
||||
if (!isInitialized()) return false; \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_KEYWORD_LIST && keyword ->IsEnabled()) { return list ->op(); } \
|
||||
else if (check) { return false; } \
|
||||
else if (id == ID_KEYWORD && keyword ->IsEnabled()) { return keyword ->op(); } \
|
||||
else if (id == ID_MATCH && match ->IsEnabled()) { return match ->op(); } \
|
||||
else if (id == ID_REMINDER && reminder->IsEnabled()) { return reminder->op(); } \
|
||||
else if (id == ID_RULES && rules ->IsEnabled()) { return rules ->op(); } \
|
||||
else if (id == ID_KEYWORD && keyword ->IsEnabled()) { return keyword ->op(); } \
|
||||
else if (id == ID_MATCH && match ->IsEnabled()) { return match ->op(); } \
|
||||
else if (id == ID_REMINDER && reminder->IsEnabled()) { return reminder->op(); } \
|
||||
else if (id == ID_RULES && rules ->IsEnabled()) { return rules ->op(); } \
|
||||
else { return false; }
|
||||
|
||||
bool KeywordsPanel::canCopy() const { CUT_COPY_PASTE(canCopy, return, false) }
|
||||
|
||||
@@ -146,11 +146,11 @@ void StylePanel::selectCard(const CardP& card) {
|
||||
// ----------------------------------------------------------------------------- : Clipboard
|
||||
|
||||
// determine what control to use for clipboard actions
|
||||
#define CUT_COPY_PASTE(op,return) \
|
||||
if (!isInitialized()) return false; \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_EDITOR) { return editor->op(); } \
|
||||
else { return false; }
|
||||
#define CUT_COPY_PASTE(op,return) \
|
||||
if (!isInitialized()) return false; \
|
||||
int id = focused_control(this); \
|
||||
if (id == ID_EDITOR) { return editor->op(); } \
|
||||
else { return false; }
|
||||
|
||||
bool StylePanel::canCopy() const { CUT_COPY_PASTE(canCopy, return) }
|
||||
bool StylePanel::canCut() const { CUT_COPY_PASTE(canCut, return) }
|
||||
|
||||
Reference in New Issue
Block a user