summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2018-05-22 14:33:19 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2018-05-22 16:53:05 +0300
commit23a9d3b62362905b926405f74d6932f420666d2f (patch)
tree41aeb3b464dcba49fdf4ea080b56ed93facb6875
parent94ec9e15d5c418ff767dbf92c5d49914e5a55dd5 (diff)
downloadqtlocation-mapboxgl-23a9d3b62362905b926405f74d6932f420666d2f.tar.gz
[core] Use std::ios::binary format in std::ifstream
-rw-r--r--src/mbgl/util/io.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/util/io.cpp b/src/mbgl/util/io.cpp
index 6a6ed7b250..058cd0d202 100644
--- a/src/mbgl/util/io.cpp
+++ b/src/mbgl/util/io.cpp
@@ -20,7 +20,7 @@ void write_file(const std::string &filename, const std::string &data) {
}
std::string read_file(const std::string &filename) {
- std::ifstream file(filename);
+ std::ifstream file(filename, std::ios::binary);
if (file.good()) {
std::stringstream data;
data << file.rdbuf();
@@ -31,7 +31,7 @@ std::string read_file(const std::string &filename) {
}
optional<std::string> readFile(const std::string &filename) {
- std::ifstream file(filename);
+ std::ifstream file(filename, std::ios::binary);
if (file.good()) {
std::stringstream data;
data << file.rdbuf();