From 9067f248cfc1e6ebc65f209cde8cbbf16334de9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 17 May 2013 19:53:52 +0000 Subject: git-svn-id: http://svn.miranda-ng.org/main/trunk@4712 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/communication.cpp | 2 +- protocols/FacebookRM/src/list.hpp | 68 +++++++++++++++--------------- protocols/FacebookRM/src/proto.cpp | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) (limited to 'protocols') diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index c216eeccc9..793bef85ee 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -626,7 +626,7 @@ bool facebook_client::login(const std::string &username,const std::string &passw data += "&email=" + utils::url::encode(username); data += "&pass=" + utils::url::encode(password); - ptrA locale( db_get_sa(NULL, parent->m_szModuleName, FACEBOOK_KEY_LOCALE)); + ptrA locale(db_get_sa(NULL, parent->m_szModuleName, FACEBOOK_KEY_LOCALE)); if (locale != NULL) data += "&locale=" + std::string(locale); diff --git a/protocols/FacebookRM/src/list.hpp b/protocols/FacebookRM/src/list.hpp index 9b90f1b1ad..851645509b 100644 --- a/protocols/FacebookRM/src/list.hpp +++ b/protocols/FacebookRM/src/list.hpp @@ -32,14 +32,14 @@ namespace List Item< T >* prev; Item< T >* next; - Item( ) + Item() { this->data = NULL; this->prev = NULL; this->next = NULL; } - ~Item( ) + ~Item() { delete this->data; } @@ -53,40 +53,40 @@ namespace List unsigned int count; public: - List( ) + List() { this->first = this->last = NULL; this->count = 0; } - ~List( ) + ~List() { - this->clear( ); + this->clear(); } - Item< T >* begin( ) + Item< T >* begin() { return first; } - Item< T >* end( ) + Item< T >* end() { return last; } - unsigned int size( ) + unsigned int size() { return count; } - bool empty( ) + bool empty() { - return ( this->first == NULL ); + return (this->first == NULL); } - void insert( Item< T >* item ) + void insert(Item< T >* item) { - if ( this->empty( )) + if (this->empty()) { this->first = this->last = item; this->count = 1; @@ -98,34 +98,34 @@ namespace List } } - void insert( std::pair< std::string, T* > item ) + void insert(std::pair< std::string, T* > item) { Item* ins = new Item; ins->key = item.first; ins->data = item.second; - this->insert( ins ); + this->insert(ins); } - void erase( std::string key ) + void erase(std::string key) { Item< T >* help = this->first; - while ( help != NULL ) + while (help != NULL) { - if ( help->key.compare( key ) != 0 ) + if (help->key.compare(key) != 0) help = help->next; else { - if ( help == this->first ) + if (help == this->first) { this->first = help->next; - if ( this->first != NULL ) + if (this->first != NULL) this->first->prev = NULL; else this->last = NULL; } - else if ( help == this->last ) + else if (help == this->last) { this->last = help->prev; - if ( this->last != NULL ) + if (this->last != NULL) this->last->next = NULL; else this->first = NULL; @@ -145,18 +145,18 @@ namespace List } } - void erase( Item< T >* item ) + void erase(Item< T >* item) { if (item != NULL) - erase( item->key ); + erase(item->key); } - T* find( std::string key ) + T* find(std::string key) { - Item< T >* help = this->begin( ); - while ( help != NULL ) + Item< T >* help = this->begin(); + while (help != NULL) { - if ( help->key.compare( key ) != 0 ) + if (help->key.compare(key) != 0) help = help->next; else return help->data; @@ -164,25 +164,25 @@ namespace List return NULL; } - T* at( const unsigned int item ) + T* at(const unsigned int item) { if (item >= this->count) return NULL; - Item< T >* help = this->begin( ); - for ( unsigned int i = 0; i < item; i++ ) + Item< T >* help = this->begin(); + for (unsigned int i = 0; i < item; i++) help = help->next; return help->item; } - T* operator[]( const unsigned int item ) + T* operator[](const unsigned int item) { - return at( item ); + return at(item); } - void clear( ) + void clear() { Item< T >* help; - while ( this->first != NULL ) + while (this->first != NULL) { help = this->first; this->first = this->first->next; diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index ab040021e1..110dc14377 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -498,7 +498,7 @@ int FacebookProto::Poke(WPARAM wParam,LPARAM lParam) HANDLE hContact = reinterpret_cast(wParam); - ptrA id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID)); + ptrA id(db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID)); if (id == NULL) return 1; -- cgit v1.2.3