Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:
#!/bin/bash
# Command to convert PRUnichar to char16_t
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*modules/libmar*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name prtypes.h \
! -name Char16.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRUnichar char16_t
This commit is contained in:
@@ -90,7 +90,7 @@ const wchar_t kOldWndProcProp[] = L"MozillaIPCOldWndProc";
|
||||
// This isn't defined before Windows XP.
|
||||
enum { WM_XP_THEMECHANGED = 0x031A };
|
||||
|
||||
PRUnichar gAppMessageWindowName[256] = { 0 };
|
||||
char16_t gAppMessageWindowName[256] = { 0 };
|
||||
int32_t gAppMessageWindowNameLength = 0;
|
||||
|
||||
nsTArray<HWND>* gNeuteredWindows = nullptr;
|
||||
@@ -300,7 +300,7 @@ ProcessOrDeferMessage(HWND hwnd,
|
||||
wchar_t className[256] = { 0 };
|
||||
if (GetClassNameW(hwnd, className, sizeof(className) - 1) > 0) {
|
||||
log.AppendLiteral(" (\"");
|
||||
log.Append(NS_ConvertUTF16toUTF8((PRUnichar*)className));
|
||||
log.Append(NS_ConvertUTF16toUTF8((char16_t*)className));
|
||||
log.AppendLiteral("\")");
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ WindowIsDeferredWindow(HWND hWnd)
|
||||
return false;
|
||||
}
|
||||
|
||||
PRUnichar buffer[256] = { 0 };
|
||||
char16_t buffer[256] = { 0 };
|
||||
int length = GetClassNameW(hWnd, (wchar_t*)buffer, sizeof(buffer) - 1);
|
||||
if (length <= 0) {
|
||||
NS_WARNING("Failed to get class name!");
|
||||
|
||||
Reference in New Issue
Block a user