diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-21 13:15:59 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-06-21 13:15:59 +0100 |
commit | 4e8c07d3fd949287fc2361284a5a7704e642396e (patch) | |
tree | 18d7e5c2d41cedb00a29ac303637102c7d4b157d /src/iomanager.cpp | |
parent | f3e75c7f821675740736b46094382d55c7e6ee5c (diff) | |
download | YAGE-4e8c07d3fd949287fc2361284a5a7704e642396e.tar.gz YAGE-4e8c07d3fd949287fc2361284a5a7704e642396e.zip |
Correcting indentation and removed vector2d.cpp
Diffstat (limited to 'src/iomanager.cpp')
-rw-r--r-- | src/iomanager.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/iomanager.cpp b/src/iomanager.cpp index b5e5518f..697273dc 100644 --- a/src/iomanager.cpp +++ b/src/iomanager.cpp @@ -8,25 +8,25 @@ namespace yage 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()) - throw std::runtime_error("Could not open '"+file_path+"'"); + std::ifstream file(file_path, std::ios::binary); + if(!file.is_open()) + throw std::runtime_error("Could not open '"+file_path+"'"); - // seek to the end - file.seekg(0, std::ios::end); + // seek to the end + file.seekg(0, std::ios::end); - // get the file size - int file_size = file.tellg(); - file.seekg(0, std::ios::beg); + // get the file size + int file_size = file.tellg(); + file.seekg(0, std::ios::beg); - // reduce file size by header bytes - file_size -= file.tellg(); + // reduce file size by header bytes + file_size -= file.tellg(); - buffer.resize(file_size); - file.read((char *)&buffer[0], file_size); - file.close(); + buffer.resize(file_size); + file.read((char *)&buffer[0], file_size); + file.close(); - return true; + return true; } } // yage |