From 1705273c443d069c82fac78ad34d909513af519b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 20 Dec 2014 03:22:13 +0000 Subject: Omegle: Various fixes and code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@11541 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Omegle/src/communication.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/Omegle/src/communication.cpp') diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index 377a9e6e53..fb2641a88b 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -96,20 +96,20 @@ http::response Omegle_client::flap( const int request_type, std::string* request return resp; } -bool Omegle_client::handle_entry( std::string method ) +bool Omegle_client::handle_entry(const std::string &method ) { parent->debugLogA(" >> Entering %s()", method.c_str()); return true; } -bool Omegle_client::handle_success( std::string method ) +bool Omegle_client::handle_success(const std::string &method ) { parent->debugLogA(" << Quitting %s()", method.c_str()); reset_error(); return true; } -bool Omegle_client::handle_error( std::string method, bool force_disconnect ) +bool Omegle_client::handle_error(const std::string &method, bool force_disconnect ) { bool result; increment_error(); @@ -138,7 +138,7 @@ std::string Omegle_client::get_server( bool not_last ) { BYTE q = not_last ? 1 : 0; - BYTE server = db_get_b(NULL, parent->m_szModuleName, OMEGLE_KEY_SERVER, 0); + int server = db_get_b(NULL, parent->m_szModuleName, OMEGLE_KEY_SERVER, 0); if (server < 0 || server >= (SIZEOF(servers)-q)) server = 0; @@ -152,7 +152,7 @@ std::string Omegle_client::get_server( bool not_last ) std::string Omegle_client::get_language() { - BYTE language = db_get_b(NULL, parent->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0); + int language = db_get_b(NULL, parent->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0); if (language < 0 || language >= (SIZEOF(languages))) language = 0; @@ -304,7 +304,7 @@ NETLIBHTTPHEADER* Omegle_client::get_request_headers( int request_type, int* hea void Omegle_client::store_headers( http::response* resp, NETLIBHTTPHEADER* headers, int headersCount ) { - for ( int i = 0; i < headersCount; i++ ) + for ( size_t i = 0; i < headersCount; i++ ) { std::string header_name = headers[i].szName; std::string header_value = headers[i].szValue; @@ -740,7 +740,7 @@ bool Omegle_client::events( ) } } -bool Omegle_client::send_message( std::string message_text ) +bool Omegle_client::send_message(const std::string &message_text ) { handle_entry( "send_message" ); -- cgit v1.2.3