summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-25 23:10:36 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-25 23:10:36 +0300
commita411a7391bb879db8da398f067245a13c7fa7aee (patch)
tree4b2c76ca8bc0b43b1084b8234746810c3ef6c446 /src/core/stdmsg
parent942c498d6e8901f751b088c0adfcb8f3fc67576c (diff)
major code cleaning of all font-related structures
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/chat_manager.cpp2
-rw-r--r--src/core/stdmsg/src/msgoptions.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp
index 84afc895b4..18626e3f28 100644
--- a/src/core/stdmsg/src/chat_manager.cpp
+++ b/src/core/stdmsg/src/chat_manager.cpp
@@ -146,7 +146,7 @@ static void OnLoadSettings()
static void RegisterFonts()
{
- ColourIDW colourid = { sizeof(colourid) };
+ ColourIDW colourid = {};
strncpy(colourid.dbSettingsGroup, CHAT_MODULE, sizeof(colourid.dbSettingsGroup));
wcsncpy(colourid.group, LPGENW("Message sessions") L"/" LPGENW("Chat module"), _countof(colourid.group));
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp
index d8c88d0327..98cd0e55b2 100644
--- a/src/core/stdmsg/src/msgoptions.cpp
+++ b/src/core/stdmsg/src/msgoptions.cpp
@@ -95,7 +95,7 @@ bool LoadMsgDlgFont(int i, LOGFONT* lf, COLORREF * colour)
void RegisterSRMMFonts(void)
{
- FontIDW fontid = { sizeof(fontid) };
+ FontIDW fontid = {};
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
for (int i = 0; i < _countof(fontOptionsList); i++) {
strncpy_s(fontid.dbSettingsGroup, SRMMMOD, _TRUNCATE);
@@ -104,7 +104,7 @@ void RegisterSRMMFonts(void)
char idstr[10];
mir_snprintf(idstr, "SRMFont%d", i);
- strncpy_s(fontid.prefix, idstr, _TRUNCATE);
+ strncpy_s(fontid.setting, idstr, _TRUNCATE);
fontid.order = i;
fontid.flags &= ~FIDF_CLASSMASK;
@@ -120,7 +120,7 @@ void RegisterSRMMFonts(void)
g_plugin.addFont(&fontid);
}
- ColourIDW colourid = { sizeof(colourid) };
+ ColourIDW colourid = {};
strncpy_s(colourid.dbSettingsGroup, SRMMMOD, _TRUNCATE);
strncpy_s(colourid.setting, SRMSGSET_BKGCOLOUR, _TRUNCATE);
colourid.defcolour = SRMSGDEFSET_BKGCOLOUR;