diff options
-rw-r--r-- | include/m_json.h | 3 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp | 1 | ||||
-rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/utilities.cpp | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/m_json.h b/include/m_json.h index 99266e27d7..d381ab6f20 100644 --- a/include/m_json.h +++ b/include/m_json.h @@ -133,10 +133,11 @@ public: __forceinline JSONNODE* Parse(LPCSTR text) { return (m_node = json_parse(text)); }
};
+}
+
#ifdef _XSTRING_
MIR_C_CORE_DLL(std::string) json_as_pstring(const JSONNODE *node);
#endif
-}
#endif
diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp index 866a94e702..9da677ba87 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp @@ -5,6 +5,7 @@ * Author: Antonio
*/
+#include <algorithm>
#include "BinTreeNodeReader.h"
#include "WAException.h"
#include "ProtocolTreeNode.h"
diff --git a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp index 0ec6e7e962..f2603f9f8d 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/utilities.cpp @@ -2,6 +2,7 @@ #include "utilities.h"
#include <iostream>
+#include <io.h>
#include <cstdio>
#include <stdlib.h>
#include <cstdlib>
@@ -261,8 +262,7 @@ vector<unsigned char>* loadFileToBytes(const string& path) { }
bool fileExists(const std::string& path) {
- std::ifstream in(path.c_str());
- return in != NULL;
+ return _access(path.c_str(), 0) == 0;
}
|