summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-02-06 23:36:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-02-06 23:36:02 +0000
commitb2f86045d3b3dc2a454f127f186429b60e493072 (patch)
treef56c5696ef3ebf62b1a97e4abbfcbc332adbbd28 /protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
parent8c6ce1ceb218db86d059372e18277c16b1ab20cb (diff)
merge from branch
git-svn-id: http://svn.miranda-ng.org/main/trunk@12029 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/utilities.cpp')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/utilities.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
index 0734c34210..1c6f28e009 100644
--- a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
+++ b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp
@@ -14,7 +14,7 @@ const static char digits[] = {
'u', 'v', 'w', 'x', 'y', 'z'
};
-std::string reverseString(const std::string& str)
+std::string reverseString(const std::string &str)
{
return std::string(str.rbegin(), str.rend());
}
@@ -51,7 +51,7 @@ std::string itoa(int value, unsigned int base)
}
-std::string processIdentity(const std::string& id)
+std::string processIdentity(const std::string &id)
{
std::string buffer_str = reverseString(id);
@@ -69,7 +69,7 @@ std::string processIdentity(const std::string& id)
return buffer_str;
}
-void debug(const std::string& msg)
+void debug(const std::string &msg)
{
#ifdef _LOGWIN32
cout << "DEBUG: " << msg << endl;
@@ -153,7 +153,7 @@ time_t parseBBDate(const string& s)
return mktime(&timeinfo);
}
-long long parseLongLong(const std::string& str)
+long long parseLongLong(const std::string &str)
{
std::stringstream sstr(str);
long long val;
@@ -235,7 +235,7 @@ vector<unsigned char>* loadFileToBytes(const string& path)
return bytes;
}
-bool fileExists(const std::string& path)
+bool fileExists(const std::string &path)
{
return _access(path.c_str(), 0) == 0;
}
@@ -260,7 +260,7 @@ string removeWaDomainFromJid(const string& jid)
return jid;
}
-string getNameFromPath(const std::string& path)
+string getNameFromPath(const std::string &path)
{
size_t i = path.rfind('/');
if (i == string::npos)
@@ -270,17 +270,17 @@ string getNameFromPath(const std::string& path)
return path.substr(i);
}
-vector<unsigned char>* getChallengeData(const std::string& challengeFile)
+vector<unsigned char>* getChallengeData(const std::string &challengeFile)
{
return loadFileToBytes(challengeFile);
}
-bool saveChallengeData(const std::vector<unsigned char>& data, const std::string& challengeFile)
+bool saveChallengeData(const std::vector<unsigned char>& data, const std::string &challengeFile)
{
return saveBytesToFile(data, challengeFile);
}
-std::string utf8_to_utf16(const std::string& utf8)
+std::string utf8_to_utf16(const std::string &utf8)
{
std::vector<unsigned long> unicode;
size_t i = 0;