diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-11 20:03:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-11 20:03:02 +0300 |
commit | 91fa2122a536770924bb2819bec4b79e76393d08 (patch) | |
tree | 93c0e191249b2158cf92a564630a4b16e9ccdcaa /src/utils/copynpaste.cpp | |
parent | 1a524dc9468fe532bc060a73ef736a68687aadca (diff) | |
download | plus-91fa2122a536770924bb2819bec4b79e76393d08.tar.gz plus-91fa2122a536770924bb2819bec4b79e76393d08.tar.bz2 plus-91fa2122a536770924bb2819bec4b79e76393d08.tar.xz plus-91fa2122a536770924bb2819bec4b79e76393d08.zip |
Fix code style and small perfomance issues.
Diffstat (limited to 'src/utils/copynpaste.cpp')
-rw-r--r-- | src/utils/copynpaste.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp index 3c7a5b3b7..2b7acc0e1 100644 --- a/src/utils/copynpaste.cpp +++ b/src/utils/copynpaste.cpp @@ -142,7 +142,6 @@ bool getDataFromPasteboard(PasteboardRef inPasteboard, char* flavorText /* out */, const int bufSize) { - OSStatus err = noErr; PasteboardSyncFlags syncFlags; ItemCount itemCount; @@ -151,7 +150,7 @@ bool getDataFromPasteboard(PasteboardRef inPasteboard, //require_action( syncFlags & kPasteboardModified, PasteboardOutOfSync, // err = badPasteboardSyncErr ); - err = PasteboardGetItemCount(inPasteboard, &itemCount); + OSStatus err = PasteboardGetItemCount(inPasteboard, &itemCount); require_noerr(err, CantGetPasteboardItemCount); for (UInt32 itemIndex = 1; itemIndex <= itemCount; itemIndex ++) @@ -239,10 +238,8 @@ CantGetPasteboardItemCount: bool getClipBoard(char* text /* out */, const int bufSize) { - OSStatus err = noErr; - PasteboardRef theClipboard; - err = PasteboardCreate(kPasteboardClipboard, &theClipboard); + OSStatus err = PasteboardCreate(kPasteboardClipboard, &theClipboard); require_noerr(err, PasteboardCreateFailed); if (!getDataFromPasteboard(theClipboard, text, bufSize)) |