Closed Bug 1181395 Opened 7 years ago Closed 7 years ago
Class Name* constants in ns Windows Def .h use wchar _t to avoid runtime conversion
Currently, the kClass* constants in nsWindowsDef.h use `const char` type. However, we are currently using the Unicode version of Windows API, which means we have to do runtime conversion every time when we use those constants. We should change them to type `const wchar_t` instead.
Assignee: nobody → quanxunzhen
Summary: Make kClass* constants in nsWindowsDef.h use wchar_t to avoid runtime conversion → Make kClassName* constants in nsWindowsDef.h use wchar_t to avoid runtime conversion
This patch removes nsWindow::sDefaultMainWindowClass so that we can pass the literal strings everywhere without wrapping them in nsString in advance. You can r+ either one as you like. I prefer this patch, though, because I don't see the static field makes any sense.
Attachment #8630827 - Flags: review?(jmathies)
Comment on attachment 8630827 [details] [diff] [review] another patch I like this one too. Thanks!
Attachment #8630827 - Flags: review?(jmathies) → review+
After this, I got errors. I use vc14rc. widget/windows/nsWindow.cpp(757): error C2660: “nsAString_internal::AssignLiteral”: function does not take one parameters
(In reply to zhoubcfan from comment #5) > After this, I got errors. I use vc14rc. > widget/windows/nsWindow.cpp(757): error C2660: > “nsAString_internal::AssignLiteral”: function does not take one parameters Could you please file a bug blocking this bug and bug 1119082 and provide more detailed information there? Since we haven't officially started supporting VC14, this error shouldn't block landing of this bug anyway.
OK. I filed Bug 1181912 .
You need to log in before you can comment on or make changes to this bug.