diff options
| author | 2021-11-10 00:54:13 -0500 | |
|---|---|---|
| committer | 2021-11-10 00:54:13 -0500 | |
| commit | beb08eb751fa8e1f72042f263316ab5e5ddb596d (patch) | |
| tree | 3b00df983527648bdae610ac7b88cb639b1f1828 /src/lib/barrier/DragInformation.cpp | |
| parent | fbc30002ab3438356c0476e70c4577a0310d52c0 (diff) | |
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/lib/barrier/DragInformation.cpp')
| -rw-r--r-- | src/lib/barrier/DragInformation.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/barrier/DragInformation.cpp b/src/lib/barrier/DragInformation.cpp index db28f3d..5a46678 100644 --- a/src/lib/barrier/DragInformation.cpp +++ b/src/lib/barrier/DragInformation.cpp @@ -1,11 +1,11 @@ /* * barrier -- mouse and keyboard sharing utility * Copyright (C) 2013-2016 Symless Ltd. - * + * * This package is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * found in the file LICENSE that should have accompanied this file. - * + * * This package is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -41,7 +41,7 @@ DragInformation::parseDragInfo(DragFileList& dragFileList, UInt32 fileNum, Strin if (data.find("/", startPos) != string::npos) { slash = "/"; } - + UInt32 index = 0; while (index < fileNum) { findResult1 = data.find(',', startPos); @@ -51,7 +51,7 @@ DragInformation::parseDragInfo(DragFileList& dragFileList, UInt32 fileNum, Strin //TODO: file number does not match, something goes wrong break; } - + // set filename if (findResult1 - findResult2 > 1) { String filename = data.substr(findResult2 + 1, @@ -61,7 +61,7 @@ DragInformation::parseDragInfo(DragFileList& dragFileList, UInt32 fileNum, Strin dragFileList.push_back(di); } startPos = findResult1 + 1; - + //set filesize findResult2 = data.find(',', startPos); if (findResult2 - findResult1 > 1) { @@ -71,7 +71,7 @@ DragInformation::parseDragInfo(DragFileList& dragFileList, UInt32 fileNum, Strin dragFileList.at(index).setFilesize(size); } startPos = findResult1 + 1; - + ++index; } @@ -151,8 +151,8 @@ DragInformation::getFileSize(String& filename) stringstream ss; ss << size; - + file. close(); - + return ss.str(); } |
