diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-25 23:10:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-25 23:10:36 +0300 |
commit | a411a7391bb879db8da398f067245a13c7fa7aee (patch) | |
tree | 4b2c76ca8bc0b43b1084b8234746810c3ef6c446 /utils | |
parent | 942c498d6e8901f751b088c0adfcb8f3fc67576c (diff) |
major code cleaning of all font-related structures
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mir_fonts.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/mir_fonts.cpp b/utils/mir_fonts.cpp index 8716e3c491..0f97ef2f5f 100644 --- a/utils/mir_fonts.cpp +++ b/utils/mir_fonts.cpp @@ -8,10 +8,9 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, const wchar_t *pszSection, const wchar_t *pszDescription, const wchar_t *pszBackgroundGroup, const wchar_t *pszBackgroundName, int position, BOOL bAllowEffects, LOGFONT *plfDefault, COLORREF clrDefault) { - FontIDW fid = { 0 }; - fid.cbSize = sizeof(fid); + FontIDW fid = {}; mir_strncpy(fid.dbSettingsGroup, pszDbModule, sizeof(fid.dbSettingsGroup)); /* buffer safe */ - mir_strncpy(fid.prefix, pszDbName, sizeof(fid.prefix)); /* buffer safe */ + mir_strncpy(fid.setting, pszDbName, sizeof(fid.setting)); /* buffer safe */ mir_wstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer safe */ mir_wstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */ mir_wstrncpy(fid.backgroundGroup, pszBackgroundGroup, _countof(fid.backgroundGroup)); /* buffer safe */ @@ -36,8 +35,7 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, con int FontService_RegisterColor(const char *pszDbModule, const char *pszDbName, const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF clrDefault) { - ColourIDW cid = { 0 }; - cid.cbSize = sizeof(cid); + ColourIDW cid = {}; cid.defcolour = clrDefault; mir_strncpy(cid.dbSettingsGroup, pszDbModule, sizeof(cid.dbSettingsGroup)); /* buffer safe */ mir_strncpy(cid.setting, pszDbName, sizeof(cid.setting)); /* buffer safe */ |