Code cleanup: remove messy spaces before line continuation (\) in macros

This commit is contained in:
Twan van Laarhoven
2020-04-26 00:37:13 +02:00
parent 5d4c3402df
commit 5e92d9455c
19 changed files with 263 additions and 265 deletions
+5 -5
View File
@@ -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) }
+3 -3
View File
@@ -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; }
+8 -8
View File
@@ -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) }
+5 -5
View File
@@ -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) }