From 30ab6ceb71842f003f649b3d62b89af010cf40d1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2012 17:00:14 +0000 Subject: - direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call; - obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Omegle/utils.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'protocols/Omegle/utils.cpp') diff --git a/protocols/Omegle/utils.cpp b/protocols/Omegle/utils.cpp index 975ab7df4c..f524dcfba1 100644 --- a/protocols/Omegle/utils.cpp +++ b/protocols/Omegle/utils.cpp @@ -25,7 +25,7 @@ along with this program. If not, see . std::string utils::url::encode(const std::string &s) { char *encoded = reinterpret_cast(CallService( MS_NETLIB_URLENCODE, - 0,reinterpret_cast(s.c_str()) )); + 0,reinterpret_cast(s.c_str()))); std::string ret = encoded; HeapFree(GetProcessHeap(),0,encoded); @@ -36,7 +36,7 @@ void utils::text::replace_first( std::string* data, std::string from, std::strin { std::string::size_type position = 0; - if ( ( position = data->find(from, position) ) != std::string::npos ) + if ( ( position = data->find(from, position)) != std::string::npos ) { data->replace( position, from.size(), to ); position++; @@ -47,7 +47,7 @@ void utils::text::replace_all( std::string* data, std::string from, std::string { std::string::size_type position = 0; - while ( ( position = data->find( from, position ) ) != std::string::npos ) + while ( ( position = data->find( from, position )) != std::string::npos ) { data->replace( position, from.size(), to ); position++; @@ -77,14 +77,14 @@ std::string utils::text::slashu_to_utf8( std::string data ) if ( udn >= 128 && udn <= 2047 ) { // U+0080 .. U+07FF - new_string += ( char )( 192 + ( udn / 64 ) ); - new_string += ( char )( 128 + ( udn % 64 ) ); + new_string += ( char )( 192 + ( udn / 64 )); + new_string += ( char )( 128 + ( udn % 64 )); } else if ( udn >= 2048 && udn <= 65535 ) { // U+0800 .. U+FFFF - new_string += ( char )( 224 + ( udn / 4096 ) ); - new_string += ( char )( 128 + ( ( udn / 64 ) % 64 ) ); - new_string += ( char )( 128 + ( udn % 64 ) ); + new_string += ( char )( 224 + ( udn / 4096 )); + new_string += ( char )( 128 + ( ( udn / 64 ) % 64 )); + new_string += ( char )( 128 + ( udn % 64 )); } else if ( udn <= 127 ) { // U+0000 .. U+007F (should not appear) @@ -115,7 +115,7 @@ int utils::debug::log(std::string file_name, std::string text) char szFile[MAX_PATH]; GetModuleFileNameA(g_hInstance, szFile, SIZEOF(szFile)); std::string path = szFile; - path = path.substr( 0, path.rfind( "\\" ) ); + path = path.substr( 0, path.rfind( "\\" )); path = path.substr( 0, path.rfind( "\\" ) + 1 ); path = path + file_name.c_str() + ".txt"; -- cgit v1.2.3