Initialize SYSTEMTIME to {} instead of memset()ing
Change-Id: I7ee02a6bcf5961adce26b635f12722e12c4865d3 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>bb10
parent
a1dfe27955
commit
7d760480c0
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue