diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-02-01 17:09:49 +0000 |
commit | abada90e3f84dc703b8ddc9efcbed8a946fadead (patch) | |
tree | 2c6f9dccd510ea97cb927a7bd635422efaae547a /cpp/demo/Glacier2/chat/ChatSessionI.cpp | |
parent | removing trace message (diff) | |
download | ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2 ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip |
Expanded tabs into spaces
Diffstat (limited to 'cpp/demo/Glacier2/chat/ChatSessionI.cpp')
-rwxr-xr-x | cpp/demo/Glacier2/chat/ChatSessionI.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/cpp/demo/Glacier2/chat/ChatSessionI.cpp b/cpp/demo/Glacier2/chat/ChatSessionI.cpp index 33cfe63ad35..21e5c3c5e7e 100755 --- a/cpp/demo/Glacier2/chat/ChatSessionI.cpp +++ b/cpp/demo/Glacier2/chat/ChatSessionI.cpp @@ -44,7 +44,7 @@ ChatRoom::instance() IceUtil::StaticMutex::Lock sync(_instanceMutex); if(!_instance) { - _instance = new ChatRoom; + _instance = new ChatRoom; } return _instance; @@ -64,10 +64,10 @@ ChatRoom::leave(const ChatCallbackPrx& callback) list<ChatCallbackPrx>::iterator p; for(p = _members.begin(); p != _members.end(); ++p) { - if(Ice::proxyIdentityEqual(callback, *p)) - { - break; - } + if(Ice::proxyIdentityEqual(callback, *p)) + { + break; + } } assert(p != _members.end()); @@ -80,13 +80,13 @@ ChatRoom::message(const string& data) const Lock sync(*this); for(list<ChatCallbackPrx>::const_iterator p = _members.begin(); p != _members.end(); ++p) { - try - { - (*p)->message(data); - } - catch(const Ice::LocalException&) - { - } + try + { + (*p)->message(data); + } + catch(const Ice::LocalException&) + { + } } } @@ -101,10 +101,10 @@ ChatSessionI::setCallback(const ChatCallbackPrx& callback, const Ice::Current& c Lock sync(*this); if(!_callback) { - _callback = callback; - ChatRoomPtr chatRoom = ChatRoom::instance(); - chatRoom->message(_userId + " has entered the chat room."); - chatRoom->enter(callback); + _callback = callback; + ChatRoomPtr chatRoom = ChatRoom::instance(); + chatRoom->message(_userId + " has entered the chat room."); + chatRoom->enter(callback); } } @@ -120,10 +120,10 @@ ChatSessionI::destroy(const Ice::Current& current) Lock sync(*this); if(_callback) { - ChatRoomPtr chatRoom = ChatRoom::instance(); - chatRoom->leave(_callback); - _callback = 0; - chatRoom->message(_userId + " has left the chat room."); + ChatRoomPtr chatRoom = ChatRoom::instance(); + chatRoom->leave(_callback); + _callback = 0; + chatRoom->message(_userId + " has left the chat room."); } current.adapter->remove(current.id); } |