From 91fa2122a536770924bb2819bec4b79e76393d08 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 11 Sep 2012 20:03:02 +0300 Subject: Fix code style and small perfomance issues. --- src/utils/copynpaste.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/utils/copynpaste.cpp') 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)) -- cgit v1.2.3-60-g2f50