aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/FileInputSource.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2013-02-24 03:46:21 +0100
committerJay Berkenbilt <ejb@ql.org>2013-03-04 22:45:16 +0100
commit30027481f7f9e9191f7c8deea51850b7a76b1b1f (patch)
tree815af293c2f6e38994e6096a4499be0dc9a476f9 /libqpdf/FileInputSource.cc
parentbabb47948a408ebad12c452ba3fdd78782360167 (diff)
downloadqpdf-30027481f7f9e9191f7c8deea51850b7a76b1b1f.tar.zst
Remove all old-style casts from C++ code
Diffstat (limited to 'libqpdf/FileInputSource.cc')
-rw-r--r--libqpdf/FileInputSource.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/FileInputSource.cc b/libqpdf/FileInputSource.cc
index b1f7b5d2..b49fad99 100644
--- a/libqpdf/FileInputSource.cc
+++ b/libqpdf/FileInputSource.cc
@@ -62,8 +62,8 @@ FileInputSource::findAndSkipNextEOL()
}
else
{
- char* p1 = (char*)memchr((void*)buf, '\r', len);
- char* p2 = (char*)memchr((void*)buf, '\n', len);
+ char* p1 = static_cast<char*>(memchr(buf, '\r', len));
+ char* p2 = static_cast<char*>(memchr(buf, '\n', len));
char* p = (p1 && p2) ? std::min(p1, p2) : p1 ? p1 : p2;
if (p)
{
@@ -137,5 +137,5 @@ void
FileInputSource::unreadCh(char ch)
{
QUtil::os_wrapper(this->filename + ": unread character",
- ungetc((unsigned char)ch, this->file));
+ ungetc(static_cast<unsigned char>(ch), this->file));
}