summaryrefslogtreecommitdiff
path: root/src/core/stdfile/file.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-06-24 21:10:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-06-24 21:10:28 +0000
commitee445e9c96823f95a9a8fc47cb8a1bb40c706bec (patch)
treeca26808239050b4ec9935991127b9fbad9b602bb /src/core/stdfile/file.cpp
parent0eae5d3fe73c4db870912328fe2c41af89dcd01d (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@9572 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdfile/file.cpp')
-rw-r--r--src/core/stdfile/file.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index e7d92eb921..97b7d9549d 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -54,7 +54,7 @@ TCHAR* GetContactID(MCONTACT hContact)
case CNFT_ASCIIZ:
return (TCHAR *)ci.pszVal;
case CNFT_DWORD:
- return _itot(ci.dVal, (TCHAR *)mir_alloc(sizeof(TCHAR)* 32), 10);
+ return _itot(ci.dVal, (TCHAR *)mir_alloc(sizeof(TCHAR) * 32), 10);
}
}
}
@@ -179,7 +179,10 @@ void GetSensiblyFormattedSize(__int64 size, TCHAR *szOut, int cchOut, int unitsO
else if (size < 1024 * 1024 * 1024) unitsOverride = UNITS_MBPOINT2;
else unitsOverride = UNITS_GBPOINT3;
}
- if (unitsUsed) *unitsUsed = unitsOverride;
+
+ if (unitsUsed)
+ *unitsUsed = unitsOverride;
+
switch (unitsOverride) {
case UNITS_BYTES: mir_sntprintf(szOut, cchOut, _T("%u%s%s"), (int)size, appendUnits ? _T(" ") : _T(""), appendUnits ? TranslateT("bytes") : _T("")); break;
case UNITS_KBPOINT1: mir_sntprintf(szOut, cchOut, _T("%.1lf%s"), size / 1024.0, appendUnits ? _T(" KB") : _T("")); break;
@@ -305,8 +308,8 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
bool bEnabled = false;
char *szProto = GetContactProto(wParam);
if (szProto != NULL) {
- if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
- if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
+ if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
else if (db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
bEnabled = true;