diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-24 00:21:07 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-24 00:21:07 +0100 |
commit | 5403490b941f7c031bf1aafdb91b1098f69edbf2 (patch) | |
tree | 18cd2deb0c30b38d8ca7c5305735d2323259e020 /src/iomanager.cpp | |
parent | 2dbcbe3575134b3c6267b1a396b57080067ed9da (diff) | |
download | YAGE-5403490b941f7c031bf1aafdb91b1098f69edbf2.tar.gz YAGE-5403490b941f7c031bf1aafdb91b1098f69edbf2.zip |
Running clang-format over everything.
Edited formatting and ran it over all the files.
Diffstat (limited to 'src/iomanager.cpp')
-rw-r--r-- | src/iomanager.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/iomanager.cpp b/src/iomanager.cpp index 6059bfbc..60cd7201 100644 --- a/src/iomanager.cpp +++ b/src/iomanager.cpp @@ -11,13 +11,16 @@ #include <fstream> #include <stdexcept> -namespace yage { +namespace yage +{ -bool IoManager::readFileToBuffer(const std::string& file_path, - std::vector<unsigned char>& buffer) { +bool IoManager::readFileToBuffer(const std::string &file_path, + std::vector<unsigned char> &buffer) +{ std::ifstream file(file_path, std::ios::binary); - if (!file.is_open()) + if (!file.is_open()) { throw std::runtime_error("Could not open '" + file_path + "'"); + } // seek to the end file.seekg(0, std::ios::end); @@ -30,10 +33,10 @@ bool IoManager::readFileToBuffer(const std::string& file_path, file_size -= file.tellg(); buffer.resize(file_size); - file.read((char*)&buffer[0], file_size); + file.read((char *)&buffer[0], file_size); file.close(); return true; } -} // yage +} // yage |