diff options
author | Nikita Nemkin | 2019-01-31 11:54:35 +0000 |
---|---|---|
committer | Nikita Nemkin | 2019-04-16 09:41:59 +0000 |
commit | c64218f83b34c6936c38d867bf5bfa4cfa76fdef (patch) | |
tree | ba9b963163b5d4f5846aad636344768bf54b834a /examples | |
parent | 580b0e95b8c566f33cd479080d52608e07b040dd (diff) | |
download | eclipse.platform.swt-c64218f83b34c6936c38d867bf5bfa4cfa76fdef.tar.gz eclipse.platform.swt-c64218f83b34c6936c38d867bf5bfa4cfa76fdef.tar.xz eclipse.platform.swt-c64218f83b34c6936c38d867bf5bfa4cfa76fdef.zip |
Bug 545884 - [Win32] Remove TCHAR string wrapper (Part 1)
Replace TCHARs that are used as fixed-size buffers with plain char[]
arrays of the same size.
Change-Id: Ic54bafb4e865dff62de67a0efefc6020aa5349f3
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java index 25e1d6892b..53d4659189 100644 --- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java +++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet83.java @@ -24,7 +24,6 @@ package org.eclipse.swt.snippets; import org.eclipse.swt.*; import org.eclipse.swt.dnd.*; import org.eclipse.swt.internal.ole.win32.*; -import org.eclipse.swt.internal.win32.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; @@ -112,10 +111,10 @@ protected int[] getTypeIds(){ static String getNameFromId(int id) { String name = null; int maxSize = 128; - TCHAR buffer = new TCHAR(0, maxSize); + char [] buffer = new char [maxSize]; int size = COM.GetClipboardFormatName(id, buffer, maxSize); if (size != 0) { - name = buffer.toString(0, size); + name = new String (buffer, 0, size); } else { switch (id) { case COM.CF_HDROP: |