diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
commit | 30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch) | |
tree | b1dae7a6d545cdf622a165ba4c576d3a41d71221 /protocols/Omegle/utils.cpp | |
parent | 65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff) |
- 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
Diffstat (limited to 'protocols/Omegle/utils.cpp')
-rw-r--r-- | protocols/Omegle/utils.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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 <http://www.gnu.org/licenses/>. std::string utils::url::encode(const std::string &s)
{
char *encoded = reinterpret_cast<char*>(CallService( MS_NETLIB_URLENCODE,
- 0,reinterpret_cast<LPARAM>(s.c_str()) ));
+ 0,reinterpret_cast<LPARAM>(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";
|