summaryrefslogtreecommitdiff
path: root/tools/preproc/c_file.cpp
diff options
context:
space:
mode:
authorYamaArashi <YamaArashi@users.noreply.github.com>2017-02-03 21:25:20 -0800
committerGitHub <noreply@github.com>2017-02-03 21:25:20 -0800
commit27dc855202a2531914c83d15d5a9c3745c0ca88a (patch)
treefb04b6228467ef4f78fed680d7dfae1c4a55ad95 /tools/preproc/c_file.cpp
parent18e21f8b090a49934a80d56b1796e0c1d469a22c (diff)
parent7c96b16179792a044ded6ade1b74cdb1c0b870a5 (diff)
Merge pull request #230 from camthesaxman/tools
use std:: prefix and remove some unused functions
Diffstat (limited to 'tools/preproc/c_file.cpp')
-rw-r--r--tools/preproc/c_file.cpp16
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("}");