summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/WhatsAPI++
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++')
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp1
-rw-r--r--protocols/WhatsApp/src/WhatsAPI++/utilities.cpp4
2 files changed, 3 insertions, 2 deletions
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;
}