summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Clist_modern/src/modern_viewmodebar.cpp12
-rw-r--r--plugins/IEView/src/ChatHTMLBuilder.cpp2
-rw-r--r--plugins/IEView/src/HistoryHTMLBuilder.cpp2
-rw-r--r--plugins/IEView/src/MUCCHTMLBuilder.cpp2
-rw-r--r--plugins/IEView/src/ScriverHTMLBuilder.cpp2
-rw-r--r--plugins/IEView/src/TabSRMMHTMLBuilder.cpp2
-rw-r--r--plugins/Scriver/src/msgoptions.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp2
-rw-r--r--plugins/YAMN/src/mails/decode.cpp9
-rw-r--r--src/core/stdchat/src/tools.cpp2
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp2
-rw-r--r--src/modules/chat/chat_opts.cpp2
-rw-r--r--src/modules/clist/clcutils.cpp2
-rw-r--r--src/modules/fonts/services.cpp2
14 files changed, 22 insertions, 23 deletions
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp
index 45a9130888..955533506a 100644
--- a/plugins/Clist_modern/src/modern_viewmodebar.cpp
+++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp
@@ -113,9 +113,9 @@ void CLVM_EnumModes(pfnEnumCallback EnumCallback)
int FillModes(char *szsetting)
{
- if (szsetting[0] == (char)246)
+ if (BYTE(szsetting[0]) == 246)
return 1;
- if (szsetting[0] == (char)13)
+ if (szsetting[0] == 13)
return 1;
TCHAR * temp;
@@ -351,7 +351,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int
static int DeleteAutoModesCallback(char *szsetting)
{
- if (szsetting[0] == (char)13)
+ if (szsetting[0] == 13)
DeleteViewMode(szsetting);
return 1;
}
@@ -925,9 +925,9 @@ static int menuCounter = 0;
static int FillMenuCallback(char *szSetting)
{
- if (szSetting[0] == (char)246)
+ if (BYTE(szSetting[0]) == 246)
return 1;
- if (szSetting[0] == (char)13)
+ if (szSetting[0] == 13)
return 1;
TCHAR *temp = mir_utf8decodeT(szSetting);
@@ -1416,7 +1416,7 @@ void ApplyViewMode(const char *Name, bool onlySelector)
}
}
- SetWindowText(hwndSelector, ptrT(mir_utf8decodeW((Name[0] == (char)13) ? Name + 1 : Name)));
+ SetWindowText(hwndSelector, ptrT(mir_utf8decodeW((Name[0] == 13) ? Name + 1 : Name)));
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
CLUI__cliInvalidateRect(pcli->hwndStatus, NULL, FALSE);
diff --git a/plugins/IEView/src/ChatHTMLBuilder.cpp b/plugins/IEView/src/ChatHTMLBuilder.cpp
index d29d519a23..8f239f16bf 100644
--- a/plugins/IEView/src/ChatHTMLBuilder.cpp
+++ b/plugins/IEView/src/ChatHTMLBuilder.cpp
@@ -55,7 +55,7 @@ void ChatHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, CHATFONTMOD, str, 10);
+ lf->lfHeight = db_get_b(NULL, CHATFONTMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
diff --git a/plugins/IEView/src/HistoryHTMLBuilder.cpp b/plugins/IEView/src/HistoryHTMLBuilder.cpp
index 1672002100..2f4b16927b 100644
--- a/plugins/IEView/src/HistoryHTMLBuilder.cpp
+++ b/plugins/IEView/src/HistoryHTMLBuilder.cpp
@@ -109,7 +109,7 @@ void HistoryHTMLBuilder::loadMsgDlgFont(const char *dbSetting, LOGFONTA * lf, CO
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font.%s.Size", dbSetting);
- lf->lfHeight = (char)db_get_b(NULL, HPPMOD, str, 10);
+ lf->lfHeight = db_get_b(NULL, HPPMOD, str, 10);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
diff --git a/plugins/IEView/src/MUCCHTMLBuilder.cpp b/plugins/IEView/src/MUCCHTMLBuilder.cpp
index de4e90fb00..c28ee46257 100644
--- a/plugins/IEView/src/MUCCHTMLBuilder.cpp
+++ b/plugins/IEView/src/MUCCHTMLBuilder.cpp
@@ -51,7 +51,7 @@ void MUCCHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, MUCCMOD, str, 10);
+ lf->lfHeight = db_get_b(NULL, MUCCMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
diff --git a/plugins/IEView/src/ScriverHTMLBuilder.cpp b/plugins/IEView/src/ScriverHTMLBuilder.cpp
index e15d709236..cdb52c91d3 100644
--- a/plugins/IEView/src/ScriverHTMLBuilder.cpp
+++ b/plugins/IEView/src/ScriverHTMLBuilder.cpp
@@ -93,7 +93,7 @@ void ScriverHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "SRMFont%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, SRMMMOD, str, 10);
+ lf->lfHeight = db_get_b(NULL, SRMMMOD, str, 10);
lf->lfHeight = abs(lf->lfHeight);
lf->lfWidth = 0;
lf->lfEscapement = 0;
diff --git a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
index d574d6b034..ae655f9407 100644
--- a/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
+++ b/plugins/IEView/src/TabSRMMHTMLBuilder.cpp
@@ -123,7 +123,7 @@ void TabSRMMHTMLBuilder::loadMsgDlgFont(int i, LOGFONTA * lf, COLORREF * colour)
if (lf) {
HDC hdc = GetDC(NULL);
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, TABSRMM_FONTMODULE, str, 10);
+ lf->lfHeight = db_get_b(NULL, TABSRMM_FONTMODULE, str, 10);
ReleaseDC(NULL, hdc);
lf->lfWidth = 0;
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index e476d5a419..4bc082cdca 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -173,7 +173,7 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour)
if (lf) {
mir_snprintf(str, SIZEOF(str), "%s%dSize", "SRMFont", i);
- lf->lfHeight = (char)db_get_b(NULL, SRMMMOD, str, fontOptionsList[i].defSize);
+ lf->lfHeight = db_get_b(NULL, SRMMMOD, str, fontOptionsList[i].defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 86e9645505..610d867924 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -192,7 +192,7 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char)M.GetByte(szMod, str, fol[j].defSize);
+ lf->lfHeight = M.GetByte(szMod, str, fol[j].defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
diff --git a/plugins/YAMN/src/mails/decode.cpp b/plugins/YAMN/src/mails/decode.cpp
index f87658547e..64bbc47ad1 100644
--- a/plugins/YAMN/src/mails/decode.cpp
+++ b/plugins/YAMN/src/mails/decode.cpp
@@ -221,7 +221,7 @@ int GetCharsetFromString(char *input,size_t size)
*parser++=*pin++;
}
- *parser=(char)0;
+ *parser = 0;
#ifdef DEBUG_DECODECODEPAGE
DebugLog(DecodeFile,"<CodePage>%s</CodePage>",pout);
@@ -300,7 +300,7 @@ int DecodeQuotedPrintable(char *Src,char *Dst,int DstLen, BOOL isQ)
char *DstTemp=Dst;
DebugLog(DecodeFile,"<Decode Quoted><Input>%s</Input>",Src);
#endif
- for (int Counter=0;((char)*Src != 0) && DstLen && (Counter++<DstLen);Src++,Dst++)
+ for (int Counter=0;(*Src != 0) && DstLen && (Counter++<DstLen);Src++,Dst++)
if (*Src=='=')
{
if (!isQ) {
@@ -333,7 +333,7 @@ int DecodeQuotedPrintable(char *Src,char *Dst,int DstLen, BOOL isQ)
else
CopyCharQuotedPrintable: // Yeah. Bad programming stile.
*Dst=*Src;
- *Dst=(char)0;
+ *Dst=0;
#ifdef DEBUG_DECODEQUOTED
DebugLog(DecodeFile,"<Output>%s</Output></Decode Quoted>",DstTemp);
#endif
@@ -494,8 +494,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode)
finder++;
finderend--;
}
- //*finderend=(char)0;
- char * oneWordEncoded = new char[finderend-finder+1];
+ char *oneWordEncoded = new char[finderend-finder+1];
strncpy(oneWordEncoded,finder,finderend-finder);
oneWordEncoded[finderend-finder]=0;
switch(Encoding)
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp
index 38301b960b..4c42a46dfc 100644
--- a/src/core/stdchat/src/tools.cpp
+++ b/src/core/stdchat/src/tools.cpp
@@ -33,7 +33,7 @@ bool LoadMessageFont(LOGFONT *lf, COLORREF *colour)
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "SRMFont%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, "SRMM", str, -12);
+ lf->lfHeight = db_get_b(NULL, "SRMM", str, -12);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index 9d539bbf4d..ce140012b6 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -64,7 +64,7 @@ bool LoadMsgDlgFont(int i, LOGFONT* lf, COLORREF * colour)
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "SRMFont%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, SRMMMOD, str, fontOptionsList[i].defSize);
+ lf->lfHeight = db_get_b(NULL, SRMMMOD, str, fontOptionsList[i].defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp
index 872bf4a033..d94c6c7f87 100644
--- a/src/modules/chat/chat_opts.cpp
+++ b/src/modules/chat/chat_opts.cpp
@@ -102,7 +102,7 @@ void LoadMsgDlgFont(int i, LOGFONT *lf, COLORREF *colour)
}
if (lf) {
mir_snprintf(str, SIZEOF(str), "Font%dSize", i);
- lf->lfHeight = (char)db_get_b(NULL, CHATFONT_MODULE, str, FO.defSize);
+ lf->lfHeight = db_get_b(NULL, CHATFONT_MODULE, str, FO.defSize);
lf->lfWidth = 0;
lf->lfEscapement = 0;
lf->lfOrientation = 0;
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp
index 2755f633e7..830fd128ed 100644
--- a/src/modules/clist/clcutils.cpp
+++ b/src/modules/clist/clcutils.cpp
@@ -697,7 +697,7 @@ void fnGetFontSetting(int i, LOGFONT* lf, COLORREF* colour)
*colour = db_get_dw(NULL, "CLC", idstr, *colour);
mir_snprintf(idstr, SIZEOF(idstr), "Font%dSize", i);
- lf->lfHeight = (char) db_get_b(NULL, "CLC", idstr, lf->lfHeight);
+ lf->lfHeight = db_get_b(NULL, "CLC", idstr, lf->lfHeight);
mir_snprintf(idstr, SIZEOF(idstr), "Font%dSty", i);
BYTE style = (BYTE)db_get_b(NULL, "CLC", idstr, (lf->lfWeight == FW_NORMAL ? 0 : DBFONTF_BOLD) | (lf->lfItalic ? DBFONTF_ITALIC : 0) | (lf->lfUnderline ? DBFONTF_UNDERLINE : 0));
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp
index 0f5cdadb6c..84851bc6dd 100644
--- a/src/modules/fonts/services.cpp
+++ b/src/modules/fonts/services.cpp
@@ -159,7 +159,7 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT* lf, COLORR
}
mir_snprintf(idstr, SIZEOF(idstr), "%sSize", prefix);
- lf->lfHeight = (char)db_get_b(NULL, settings_group, idstr, lf->lfHeight);
+ lf->lfHeight = db_get_b(NULL, settings_group, idstr, lf->lfHeight);
//mir_snprintf(idstr, SIZEOF(idstr), "%sFlags", prefix);
//if (db_get_dw(NULL, settings_group, idstr, 0) & FIDF_SAVEACTUALHEIGHT) {