diff options
author | camthesaxman <cameronghall@cox.net> | 2017-02-03 23:16:28 -0600 |
---|---|---|
committer | camthesaxman <cameronghall@cox.net> | 2017-02-03 23:19:18 -0600 |
commit | 7c96b16179792a044ded6ade1b74cdb1c0b870a5 (patch) | |
tree | fb04b6228467ef4f78fed680d7dfae1c4a55ad95 /tools/preproc/c_file.cpp | |
parent | 18e21f8b090a49934a80d56b1796e0c1d469a22c (diff) |
use std:: prefix and remove some unused functions
Diffstat (limited to 'tools/preproc/c_file.cpp')
-rw-r--r-- | tools/preproc/c_file.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp index a2f178623..5bfdee086 100644 --- a/tools/preproc/c_file.cpp +++ b/tools/preproc/c_file.cpp @@ -247,23 +247,23 @@ bool CFile::CheckIdentifier(const std::string& ident) std::unique_ptr<unsigned char[]> CFile::ReadWholeFile(const std::string& path, int& size) { - FILE* fp = fopen(path.c_str(), "rb"); + FILE* fp = std::fopen(path.c_str(), "rb"); if (fp == nullptr) RaiseError("Failed to open \"%s\" for reading.\n", path.c_str()); - fseek(fp, 0, SEEK_END); + std::fseek(fp, 0, SEEK_END); - size = ftell(fp); + size = std::ftell(fp); std::unique_ptr<unsigned char[]> buffer = std::unique_ptr<unsigned char[]>(new unsigned char[size]); - rewind(fp); + std::rewind(fp); - if (fread(buffer.get(), size, 1, fp) != 1) + if (std::fread(buffer.get(), size, 1, fp) != 1) RaiseError("Failed to read \"%s\".\n", path.c_str()); - fclose(fp); + std::fclose(fp); return buffer; } @@ -379,9 +379,9 @@ void CFile::TryConvertIncbin() offset += size; if (isSigned) - printf("%d,", data); + std::printf("%d,", data); else - printf("%uu,", data); + std::printf("%uu,", data); } std::printf("}"); |