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/FacebookRM/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/FacebookRM/utils.cpp')
-rw-r--r-- | protocols/FacebookRM/utils.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/protocols/FacebookRM/utils.cpp b/protocols/FacebookRM/utils.cpp index e34238a372..8e33b26e01 100644 --- a/protocols/FacebookRM/utils.cpp +++ b/protocols/FacebookRM/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);
@@ -114,7 +114,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++;
@@ -126,7 +126,7 @@ unsigned int utils::text::count_all( std::string* data, std::string term ) unsigned int count = 0;
std::string::size_type position = 0;
- while ( ( position = data->find( term, position ) ) != std::string::npos )
+ while ( ( position = data->find( term, position )) != std::string::npos )
{
count++;
position++;
@@ -282,14 +282,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)
@@ -380,7 +380,7 @@ std::string utils::text::source_get_value2( std::string* data, const char *term, int utils::number::random( )
{
- srand( ::time( NULL ) );
+ srand( ::time( NULL ));
return rand( );
}
@@ -389,7 +389,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";
|