diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-08-06 00:50:34 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2017-01-24 11:36:59 +0200 |
commit | 98083a0e3edaca62a83622e84cef6d769c6b0ca4 (patch) | |
tree | 516893cb0f56614866c0a3ae36a735813fdcb2f9 | |
parent | 7ade062a51195d3514bc9d6ac6ce74e3f1516d58 (diff) | |
download | qtlocation-mapboxgl-98083a0e3edaca62a83622e84cef6d769c6b0ca4.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 f37ce09cff..0820f7d517 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 { @@ -33,8 +31,8 @@ std::string read_file(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"); } } |