summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/text/qlocale_win.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/text/qlocale_win.cpp b/src/corelib/text/qlocale_win.cpp
index c73e937581..0c83dcffb9 100644
--- a/src/corelib/text/qlocale_win.cpp
+++ b/src/corelib/text/qlocale_win.cpp
@@ -391,8 +391,7 @@ QVariant QSystemLocalePrivate::monthName(int month, QLocale::FormatType type)
QVariant QSystemLocalePrivate::toString(QDate date, QLocale::FormatType type)
{
- SYSTEMTIME st;
- memset(&st, 0, sizeof(SYSTEMTIME));
+ SYSTEMTIME st = {};
st.wYear = date.year();
st.wMonth = date.month();
st.wDay = date.day();
@@ -410,8 +409,7 @@ QVariant QSystemLocalePrivate::toString(QDate date, QLocale::FormatType type)
QVariant QSystemLocalePrivate::toString(QTime time, QLocale::FormatType type)
{
- SYSTEMTIME st;
- memset(&st, 0, sizeof(SYSTEMTIME));
+ SYSTEMTIME st = {};
st.wHour = time.hour();
st.wMinute = time.minute();
st.wSecond = time.second();