From f67bf6411c0487eedca478690d89b3a363cf32c3 Mon Sep 17 00:00:00 2001 From: Siddhant Gupta Date: Thu, 1 Apr 2021 15:34:06 +0530 Subject: [PATCH] mail: partial style cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No functional changes Change-Id: I8f2b18da4955ee48cba87359050fbe3fc8cdb9ea Reviewed-on: https://review.haiku-os.org/c/haiku/+/3830 Reviewed-by: Jérôme Duval --- src/apps/mail/Content.cpp | 4 ++-- src/apps/mail/KUndoBuffer.cpp | 2 +- src/apps/mail/MailApp.cpp | 6 +++--- src/apps/mail/Words.cpp | 26 +++++++++++++------------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/apps/mail/Content.cpp b/src/apps/mail/Content.cpp index 956a252c23..ac5ac45f8c 100644 --- a/src/apps/mail/Content.cpp +++ b/src/apps/mail/Content.cpp @@ -1371,7 +1371,7 @@ TTextView::MessageReceived(BMessage *msg) case B_INPUT_METHOD_EVENT: { int32 im_op; - if (msg->FindInt32("be:opcode", &im_op) == B_OK){ + if (msg->FindInt32("be:opcode", &im_op) == B_OK) { switch (im_op) { case B_INPUT_METHOD_STARTED: fInputMethodUndoState.replace = true; @@ -1382,7 +1382,7 @@ TTextView::MessageReceived(BMessage *msg) if (fInputMethodUndoBuffer.CountItems() > 0) { KUndoItem *undo = fInputMethodUndoBuffer.ItemAt( fInputMethodUndoBuffer.CountItems() - 1); - if (undo->History == K_INSERTED){ + if (undo->History == K_INSERTED) { fUndoBuffer.MakeNewUndoItem(); fUndoBuffer.AddUndo(undo->RedoText, undo->Length, undo->Offset, undo->History, undo->CursorPos); diff --git a/src/apps/mail/KUndoBuffer.cpp b/src/apps/mail/KUndoBuffer.cpp index 84fa08ee87..f4e2b97098 100644 --- a/src/apps/mail/KUndoBuffer.cpp +++ b/src/apps/mail/KUndoBuffer.cpp @@ -154,7 +154,7 @@ KUndoBuffer::AddUndo(const char* text, int32 length, int32 offset, int32 c_offset = CurrentUndoItem->Offset; undo_type c_history = CurrentUndoItem->History; if (c_history == history) { - switch(c_history) { + switch (c_history) { case K_INSERTED: case K_REPLACED: if ((c_offset + c_length) == offset) diff --git a/src/apps/mail/MailApp.cpp b/src/apps/mail/MailApp.cpp index 7d416c1977..0dc81a762a 100644 --- a/src/apps/mail/MailApp.cpp +++ b/src/apps/mail/MailApp.cpp @@ -392,7 +392,7 @@ TMailApp::MessageReceived(BMessage *msg) case MAIL_WINDOW: { TMailWindow* window; - if( msg->FindPointer("window", (void**)&window) == B_OK) + if (msg->FindPointer("window", (void**)&window) == B_OK) fWindowList.RemoveItem(window); fWindowCount--; break; @@ -623,7 +623,7 @@ TMailApp::RefsReceived(BMessage *msg) || strcmp(type, B_PARTIAL_MAIL_TYPE) == 0) { window = NewWindow(&ref, NULL, false, &messenger); window->Show(); - } else if(strcmp(type, "application/x-person") == 0) { + } else if (strcmp(type, "application/x-person") == 0) { /* Got a People contact info file, see if it has an Email address. */ BString name; BString email; @@ -640,7 +640,7 @@ TMailApp::RefsReceived(BMessage *msg) /* we got something... */ if (email.Length() > 0) { /* see if we can get a username as well */ - if(file.GetAttrInfo("META:name", &info) == B_NO_ERROR) { + if (file.GetAttrInfo("META:name", &info) == B_NO_ERROR) { attrib = (char *) malloc(info.size + 1); file.ReadAttr("META:name", B_STRING_TYPE, 0, attrib, info.size); attrib[info.size] = 0; // Just in case it wasn't NUL terminated. diff --git a/src/apps/mail/Words.cpp b/src/apps/mail/Words.cpp index f2b8244432..808d910d0e 100644 --- a/src/apps/mail/Words.cpp +++ b/src/apps/mail/Words.cpp @@ -525,9 +525,9 @@ suffix_word(char* dst, const char* src, char flag) end = stpcpy(dst, src); flag = toupper(flag); - switch(flag) { + switch (flag) { case 'V': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ive"); break; @@ -537,7 +537,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'N': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ion"); break; @@ -550,7 +550,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'X': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ions"); break; @@ -563,7 +563,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'H': - switch(end[-1]) { + switch (end[-1]) { case 'y': end = stpcpy(end - 1, "ieth"); break; @@ -576,7 +576,7 @@ suffix_word(char* dst, const char* src, char flag) end = stpcpy(end, "ly"); break; case 'G': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ing"); break; @@ -586,7 +586,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'J': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ings"); break; @@ -596,7 +596,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'D': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ed"); break; @@ -612,7 +612,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'T': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "est"); break; @@ -628,7 +628,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'R': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "er"); break; @@ -644,7 +644,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'Z': - switch(end[-1]) { + switch (end[-1]) { case 'e': end = stpcpy(end - 1, "ers"); break; @@ -660,7 +660,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'S': - switch(end[-1]) { + switch (end[-1]) { case 's': case 'x': case 'z': @@ -679,7 +679,7 @@ suffix_word(char* dst, const char* src, char flag) } break; case 'P': - switch(end[-1]) { + switch (end[-1]) { case 'y': if (!strchr("aeiou", end[-2])) { end = stpcpy(end - 1, "iness");