summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdmsg/src/msglog.cpp4
-rw-r--r--src/core/stduihist/history.cpp37
2 files changed, 18 insertions, 23 deletions
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp
index 1aedcf4640..be5e960c5f 100644
--- a/src/core/stdmsg/src/msglog.cpp
+++ b/src/core/stdmsg/src/msglog.cpp
@@ -245,8 +245,8 @@ static char *SetToStyle(int style)
int DbEventIsForMsgWindow(DBEVENTINFO *dbei)
{
- DBEVENTTYPEDESCR* et = ( DBEVENTTYPEDESCR* )CallService(MS_DB_EVENT_GETTYPE, ( WPARAM )dbei->szModule, ( LPARAM )dbei->eventType );
- return et && ( et->flags & DETF_MSGWINDOW );
+ DBEVENTTYPEDESCR *et = ( DBEVENTTYPEDESCR* )CallService(MS_DB_EVENT_GETTYPE, ( WPARAM )dbei->szModule, ( LPARAM )dbei->eventType );
+ return et && (et->flags & DETF_MSGWINDOW);
}
int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat)
diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp
index 13c08b692a..af51a6e95d 100644
--- a/src/core/stduihist/history.cpp
+++ b/src/core/stduihist/history.cpp
@@ -86,14 +86,12 @@ static void GetObjectDescription(DBEVENTINFO *dbei, TCHAR* str, int cbStr)
break;
default:
- {
- DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
- if (et && (et->flags & DETF_HISTORY)) {
- GetMessageDescription(dbei, str, cbStr);
- }
- else
- str[ 0 ] = 0;
-} } }
+ DBEVENTTYPEDESCR *et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ if (et && (et->flags & DETF_HISTORY))
+ GetMessageDescription(dbei, str, cbStr);
+ else
+ *str = 0;
+} }
static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr)
{
@@ -116,21 +114,18 @@ static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr)
break;
default:
- {
- DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
- if (et && (et->flags & DETF_HISTORY)) {
- pszTmp = mir_a2t(et->descr);
- pszSrc = TranslateTS(pszTmp);
- break;
- }
- else {
- str[ 0 ] = 0;
- return;
- } } }
+ DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ if (et && (et->flags & DETF_HISTORY)) {
+ pszTmp = mir_a2t(et->descr);
+ pszSrc = TranslateTS(pszTmp);
+ break;
+ }
+ *str = 0;
+ return;
+ }
_tcsncpy(str, (const TCHAR*)pszSrc, cbStr);
- str[ cbStr-1 ] = 0;
-
+ str[cbStr-1] = 0;
mir_free(pszTmp);
}