From 20d9b802910b3d912a576231eba69ef95605765a Mon Sep 17 00:00:00 2001 From: "Jerry (Xinyu Hou)" Date: Wed, 2 Dec 2015 15:17:55 -0800 Subject: [PATCH] Remove checking system clipboard formats #5041 --- src/lib/platform/MSWindowsClipboard.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/lib/platform/MSWindowsClipboard.cpp b/src/lib/platform/MSWindowsClipboard.cpp index bb7c87cb..e0523e49 100644 --- a/src/lib/platform/MSWindowsClipboard.cpp +++ b/src/lib/platform/MSWindowsClipboard.cpp @@ -166,18 +166,14 @@ MSWindowsClipboard::get(EFormat format) const { // find the converter for the first clipboard format we can handle IMSWindowsClipboardConverter* converter = NULL; - UINT win32Format = EnumClipboardFormats(0); - while (converter == NULL && win32Format != 0) { - for (ConverterList::const_iterator index = m_converters.begin(); - index != m_converters.end(); ++index) { - converter = *index; - if (converter->getWin32Format() == win32Format && - converter->getFormat() == format) { - break; - } - converter = NULL; + for (ConverterList::const_iterator index = m_converters.begin(); + index != m_converters.end(); ++index) { + + converter = *index; + if (converter->getFormat() == format) { + break; } - win32Format = EnumClipboardFormats(win32Format); + converter = NULL; } // if no converter then we don't recognize any formats