diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-12-04 18:29:42 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-12-04 20:02:50 +0100 |
commit | abafb52f37beb5659efc2105ccd1568e1f754898 (patch) | |
tree | 6a60636d3497560ca61e5aae5f6d7061c4f18553 /src/util/io.cpp | |
parent | bff6aeb4da41dee1f5f1cfa0be81b6c257257253 (diff) | |
download | qtlocation-mapboxgl-abafb52f37beb5659efc2105ccd1568e1f754898.tar.gz |
make most headers private
Diffstat (limited to 'src/util/io.cpp')
-rw-r--r-- | src/util/io.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/util/io.cpp b/src/util/io.cpp deleted file mode 100644 index 76f7c35ade..0000000000 --- a/src/util/io.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include <mbgl/util/io.hpp> - -#include <cstdio> -#include <iostream> -#include <sstream> -#include <fstream> -#include <stdexcept> - -namespace mbgl { -namespace util { - -void write_file(const std::string &filename, const std::string &data) { - FILE *fd = fopen(filename.c_str(), "wb"); - if (fd) { - fwrite(data.data(), sizeof(std::string::value_type), data.size(), fd); - fclose(fd); - } else { - throw std::runtime_error(std::string("Failed to open file ") + filename); - } -} - -std::string read_file(const std::string &filename) { - std::ifstream file(filename); - if (file.good()) { - std::stringstream data; - data << file.rdbuf(); - return data.str(); - } else { - throw std::runtime_error(std::string("Cannot read file ") + filename); - } -} - -} -} |