1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

updated sanitize filename code to use size_t instead of raw number types

This commit is contained in:
Ryan Morlok 2013-03-18 00:29:30 -05:00
parent c0972e1baa
commit ccc8ff4761

View File

@ -45,7 +45,7 @@ string sanitize_filename(const string & filename)
string sanitized;
bool format_specifier_found = false;
for(uint i = 0; i < filename.size(); i++)
for(size_t i = 0; i < filename.size(); i++)
{
if('%' == filename[i])
{
@ -57,7 +57,7 @@ string sanitize_filename(const string & filename)
else
{
// We haven't found the format specifier yet, so see if we can use this one as a valid formatter
int original_i = i;
size_t original_i = i;
string tmp;
tmp.push_back('%');
while(++i < filename.size())
@ -99,11 +99,11 @@ string sanitize_filename(const string & filename)
bool contains_integer_placeholder(const string & filename)
{
for(int i = 0; i < filename.size(); i++)
for(size_t i = 0; i < filename.size(); i++)
{
if('%' == filename[i])
{
int original_i = i;
size_t original_i = i;
char last_char = '%';
while(++i < filename.size())
{