diff options
author | Leo Ufimtsev | 2016-11-09 17:51:04 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2016-11-10 07:00:22 +0000 |
commit | 40cb272af51e68257747a70536bec80228362b68 (patch) | |
tree | f7fcb2671fe780d4ebdd0a3d6ea8bbccd732a1c5 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java | |
parent | 04862c5f2af9148ae0d045ae927e8d64de4bd5b4 (diff) | |
download | eclipse.platform.swt-40cb272af51e68257747a70536bec80228362b68.tar.gz eclipse.platform.swt-40cb272af51e68257747a70536bec80228362b68.tar.xz eclipse.platform.swt-40cb272af51e68257747a70536bec80228362b68.zip |
Bug 507235: Clean up of Converter.java
- Remove redundant codePage parameter from Converter.java. It is not
being used by the function body. (It was last used 15 years ago in:
5fbe5d6518706b4f002ddbbebf7e1f63d1877af8)
- Remove unused defaultCodePage() method from codebase.
- Move wcsToMbcs and mbcsToWcs for single characters from Display.java
into Converter.java class, next to their siblings. Display.java should
not be responsible for platform level type conversion.
- Document functions to explain their necessity.
Change-Id: Ie19b76259247d4d200c679852b8165e465f4e53b
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=507235
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java index 7b115ffbee..5b31bc46fc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java @@ -577,7 +577,7 @@ public void setTransfer(Transfer... transferAgents){ String[] typeNames = transfer.getTypeNames(); for (int j = 0; j < typeIds.length; j++) { GtkTargetEntry entry = new GtkTargetEntry(); - byte[] buffer = Converter.wcsToMbcs(null, typeNames[j], true); + byte[] buffer = Converter.wcsToMbcs(typeNames[j], true); entry.target = OS.g_malloc(buffer.length); OS.memmove(entry.target, buffer, buffer.length); entry.info = typeIds[j]; |