diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-10 17:19:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-10 17:19:12 +0000 |
commit | b43b7abf33f5b2ab480a85584df0e3ce8c76a8ca (patch) | |
tree | 98a2b9c9038974e76d40ffe7114bd7ea2df8290f /protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp | |
parent | 7ec4cc63fa1b31af0496ac934d001323519c838f (diff) |
much less crazy imlementaion of xml reader
git-svn-id: http://svn.miranda-ng.org/main/trunk@10945 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp')
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp index 0eca3aeef7..c80e44c657 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/FMessage.cpp @@ -105,10 +105,11 @@ std::string Key::toString() { }
-unsigned char FMessage::getMessage_WA_Type(std::string* type) {
- if ((type == NULL) || (type->length() == 0))
+unsigned char FMessage::getMessage_WA_Type(const std::string& type) {
+ if (type.empty())
return WA_TYPE_UNDEFINED;
- std::string typeLower = *type;
+
+ std::string typeLower = type;
std::transform(typeLower.begin(), typeLower.end(), typeLower.begin(), ::tolower);
if (typeLower.compare("system") == 0)
return WA_TYPE_SYSTEM;
|