mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:10:36 +00:00
Minor efficiency improvement
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17098 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5c510a1bc1
commit
3d611ba66c
2 changed files with 14 additions and 2 deletions
|
@ -959,8 +959,10 @@ static NSMapTable *mimeMap = NULL;
|
|||
|
||||
if (RETAIN((id)the_server) != nil)
|
||||
{
|
||||
NSConnection* conn = [(id)the_server connectionForProxy];
|
||||
NSConnection *conn = [(id)the_server connectionForProxy];
|
||||
Protocol *p = @protocol(GSPasteboardSvr);
|
||||
|
||||
[(id)the_server setProtocolForProxy: p];
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(_lostServer:)
|
||||
|
@ -1107,10 +1109,16 @@ static NSMapTable *mimeMap = NULL;
|
|||
id<GSPasteboardObj> anObj;
|
||||
|
||||
anObj = [[self _pbs] pasteboardWithName: aName];
|
||||
if (anObj)
|
||||
if (anObj != nil)
|
||||
{
|
||||
NSPasteboard *ret;
|
||||
|
||||
if ([(id)anObj isProxy] == YES)
|
||||
{
|
||||
Protocol *p = @protocol(GSPasteboardObj);
|
||||
|
||||
[(id)anObj setProtocolForProxy: p];
|
||||
}
|
||||
ret = [self _pasteboardWithTarget: anObj name: aName];
|
||||
NS_VALRETURN(ret);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue