From 30027481f7f9e9191f7c8deea51850b7a76b1b1f Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 23 Feb 2013 21:46:21 -0500 Subject: Remove all old-style casts from C++ code --- libqpdf/QPDF_Array.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libqpdf/QPDF_Array.cc') diff --git a/libqpdf/QPDF_Array.cc b/libqpdf/QPDF_Array.cc index 0c2be92f..00903fa6 100644 --- a/libqpdf/QPDF_Array.cc +++ b/libqpdf/QPDF_Array.cc @@ -49,13 +49,13 @@ QPDF_Array::getTypeName() const int QPDF_Array::getNItems() const { - return (int)this->items.size(); + return this->items.size(); } QPDFObjectHandle QPDF_Array::getItem(int n) const { - if ((n < 0) || (n >= (int)this->items.size())) + if ((n < 0) || (n >= static_cast(this->items.size()))) { throw std::logic_error( "INTERNAL ERROR: bounds error accessing QPDF_Array element"); @@ -87,7 +87,7 @@ void QPDF_Array::insertItem(int at, QPDFObjectHandle const& item) { // As special case, also allow insert beyond the end - if ((at < 0) || (at > (int)this->items.size())) + if ((at < 0) || (at > static_cast(this->items.size()))) { throw std::logic_error( "INTERNAL ERROR: bounds error accessing QPDF_Array element"); -- cgit v1.2.3-54-g00ecf