diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-08-06 00:50:34 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-07-12 15:13:33 +0300 |
commit | 3b49ec3a0b4bab40ddb9a2a9789e787089870c93 (patch) | |
tree | 8c1d09f488de256d2a562ef1fcbba30b3d792e46 | |
parent | d8cad639c66876357a8b0790c5ad68e091963b3e (diff) | |
download | qtlocation-mapboxgl-3b49ec3a0b4bab40ddb9a2a9789e787089870c93.tar.gz |
[core] Prefer std:: functions over POSIX
s/unlink/std::remove
-rw-r--r-- | src/mbgl/util/io.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mbgl/util/io.cpp b/src/mbgl/util/io.cpp index 9adc3b8988..6a6ed7b250 100644 --- a/src/mbgl/util/io.cpp +++ b/src/mbgl/util/io.cpp @@ -6,8 +6,6 @@ #include <sstream> #include <fstream> -#include <unistd.h> - namespace mbgl { namespace util { @@ -43,8 +41,8 @@ optional<std::string> readFile(const std::string &filename) { } void deleteFile(const std::string& filename) { - const int ret = unlink(filename.c_str()); - if (ret == -1) { + const int ret = std::remove(filename.c_str()); + if (ret != 0) { throw IOException(errno, "failed to unlink file"); } } |