diff options
Diffstat (limited to 'intern/ghost/intern/GHOST_DropTargetX11.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_DropTargetX11.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/intern/ghost/intern/GHOST_DropTargetX11.cpp b/intern/ghost/intern/GHOST_DropTargetX11.cpp index 680cb1ba50d..816d9c254ee 100644 --- a/intern/ghost/intern/GHOST_DropTargetX11.cpp +++ b/intern/ghost/intern/GHOST_DropTargetX11.cpp @@ -160,14 +160,12 @@ void GHOST_DropTargetX11::UrlDecode(char *decodedOut, int bufferSize, const char /* Ensure both characters are hexadecimal */ for (j = 0; j < 2; ++j) { - if (!isxdigit(tempNumBuf[j])) { + if (!isxdigit(tempNumBuf[j])) bothDigits = false; - } } - if (!bothDigits) { + if (!bothDigits) break; - } /* Convert two hexadecimal characters into one character */ sscanf(tempNumBuf, "%x", &asciiCharacter); @@ -213,9 +211,8 @@ void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dr curLength = 0; } } - else { + else curLength++; - } } strArray = (GHOST_TStringArray *)malloc(sizeof(GHOST_TStringArray)); @@ -242,9 +239,8 @@ void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dr curLength = 0; } } - else { + else curLength++; - } } return strArray; @@ -284,9 +280,8 @@ void *GHOST_DropTargetX11::getGhostData(Atom dropType, m_draggedObjectType = GHOST_kDragnDropTypeUnknown; } - if (needsFree) { + if (needsFree) free(tmpBuffer); - } return data; } @@ -308,10 +303,9 @@ bool GHOST_DropTargetX11::GHOST_HandleClientMessage(XEvent *event) &dropY)) { void *data = getGhostData(dropType, dropBuffer, dropBufferSize); - if (data) { + if (data) m_system->pushDragDropEvent( GHOST_kEventDraggingDropDone, m_draggedObjectType, m_window, dropX, dropY, data); - } free(dropBuffer); |