mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-16 02:43:20 +00:00
8225032: Fix some C++ conformance issues in AWT Windows code
Reviewed-by: prr, serb
This commit is contained in:
parent
312d66471a
commit
7202c3b943
@ -337,7 +337,7 @@ class JavaStringBuffer
|
||||
protected:
|
||||
LPWSTR m_pStr;
|
||||
jsize m_dwSize;
|
||||
LPWSTR getNonEmptyString() {
|
||||
LPCWSTR getNonEmptyString() {
|
||||
return (NULL==m_pStr)
|
||||
? L""
|
||||
: m_pStr;
|
||||
@ -378,9 +378,9 @@ public:
|
||||
m_pStr = (LPWSTR)SAFE_SIZE_ARRAY_REALLOC(safe_Realloc, m_pStr, m_dwSize+1, sizeof(WCHAR) );
|
||||
}
|
||||
//we are in UNICODE now, so LPWSTR:=:LPTSTR
|
||||
operator LPWSTR() { return getNonEmptyString(); }
|
||||
operator LPCWSTR() { return getNonEmptyString(); }
|
||||
operator LPARAM() { return (LPARAM)getNonEmptyString(); }
|
||||
void *GetData() { return (void *)getNonEmptyString(); }
|
||||
const void *GetData() { return (const void *)getNonEmptyString(); }
|
||||
jsize GetSize() { return m_dwSize; }
|
||||
};
|
||||
|
||||
|
||||
@ -449,7 +449,7 @@ public:
|
||||
static void JavaKeyToWindowsKey(UINT javaKey, UINT *windowsKey, UINT *modifiers, UINT originalWindowsKey);
|
||||
static void UpdateDynPrimaryKeymap(UINT wkey, UINT jkeyLegacy, jint keyLocation, UINT modifiers);
|
||||
|
||||
INLINE static void AwtComponent::JavaKeyToWindowsKey(UINT javaKey,
|
||||
INLINE static void JavaKeyToWindowsKey(UINT javaKey,
|
||||
UINT *windowsKey, UINT *modifiers)
|
||||
{
|
||||
JavaKeyToWindowsKey(javaKey, windowsKey, modifiers, IGNORE_KEY);
|
||||
|
||||
@ -130,7 +130,7 @@ BOOL AwtPrintControl::FindPrinter(jstring printerName, LPBYTE pPrinterEnum,
|
||||
DWORD cbBuf = *pcbBuf, dummyWord = 0;
|
||||
|
||||
JavaStringBuffer printerNameBuf(env, printerName);
|
||||
LPTSTR lpcPrinterName = (LPTSTR)printerNameBuf;
|
||||
LPCTSTR lpcPrinterName = (LPCTSTR)printerNameBuf;
|
||||
DASSERT(lpcPrinterName != NULL);
|
||||
|
||||
// For NT, first do a quick check of all remote and local printers.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user