mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
bug 359808 : fix my stupid mistake again
This commit is contained in:
parent
fb61cdfd9f
commit
11773386d4
@ -273,13 +273,12 @@ int nsDateTimeFormatWin::nsGetTimeFormatW(DWORD dwFlags, const SYSTEMTIME *lpTim
|
|||||||
const char* format, PRUnichar *timeStr, int cchTime)
|
const char* format, PRUnichar *timeStr, int cchTime)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
len = GetTimeFormatW(mLCID, dwFlags, lpTime,
|
||||||
LPCWSTR wstr = NULL;
|
format ?
|
||||||
if (format) {
|
NS_CONST_CAST(LPCWSTR,
|
||||||
NS_ConvertASCIItoUTF16 wFormat(format);
|
NS_ConvertASCIItoUTF16(format).get()) :
|
||||||
wstr = NS_CONST_CAST(LPCWSTR, wFormat.get());
|
NULL,
|
||||||
}
|
(LPWSTR) timeStr, cchTime);
|
||||||
len = GetTimeFormatW(mLCID, dwFlags, lpTime, wstr, (LPWSTR) timeStr, cchTime);
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,12 +286,11 @@ int nsDateTimeFormatWin::nsGetDateFormatW(DWORD dwFlags, const SYSTEMTIME *lpDat
|
|||||||
const char* format, PRUnichar *dateStr, int cchDate)
|
const char* format, PRUnichar *dateStr, int cchDate)
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
len = GetDateFormatW(mLCID, dwFlags, lpDate,
|
||||||
LPCWSTR wstr = NULL;
|
format ?
|
||||||
if (format) {
|
NS_CONST_CAST(LPCWSTR,
|
||||||
NS_ConvertASCIItoUTF16 wFormat(format);
|
NS_ConvertASCIItoUTF16(format).get()) :
|
||||||
wstr = NS_CONST_CAST(LPCWSTR, wFormat.get());
|
NULL,
|
||||||
}
|
(LPWSTR) dateStr, cchDate);
|
||||||
len = GetDateFormatW(mLCID, dwFlags, lpDate, wstr, (LPWSTR) dateStr, cchDate);
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user