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/platform/OSXClipboardTextConverter.cpp | |
| parent | fbc30002ab3438356c0476e70c4577a0310d52c0 (diff) | |
New upstream version 2.4.0+dfsg.upstream/2.4.0+dfsgupstream
Diffstat (limited to 'src/lib/platform/OSXClipboardTextConverter.cpp')
| -rw-r--r-- | src/lib/platform/OSXClipboardTextConverter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/platform/OSXClipboardTextConverter.cpp b/src/lib/platform/OSXClipboardTextConverter.cpp index a68258d..a4fb6ae 100644 --- a/src/lib/platform/OSXClipboardTextConverter.cpp +++ b/src/lib/platform/OSXClipboardTextConverter.cpp @@ -2,11 +2,11 @@ * barrier -- mouse and keyboard sharing utility * Copyright (C) 2012-2016 Symless Ltd. * Copyright (C) 2004 Chris Schoeneman - * + * * 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 @@ -24,7 +24,7 @@ // OSXClipboardTextConverter // -OSXClipboardTextConverter::OSXClipboardTextConverter() +OSXClipboardTextConverter::OSXClipboardTextConverter() { // do nothing } @@ -59,12 +59,12 @@ std::string OSXClipboardTextConverter::convertString(const std::string& data, 0, false, NULL, 0, &buffSize); char* buffer = new char[buffSize]; - + if (buffer == NULL) { CFRelease(stringRef); return {}; } - + CFStringGetBytes(stringRef, entireString, toEncoding, 0, false, (UInt8*)buffer, buffSize, NULL); @@ -72,7 +72,7 @@ std::string OSXClipboardTextConverter::convertString(const std::string& data, delete[] buffer; CFRelease(stringRef); - + return result; } |
