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:
parent
c0972e1baa
commit
ccc8ff4761
@ -45,7 +45,7 @@ string sanitize_filename(const string & filename)
|
|||||||
string sanitized;
|
string sanitized;
|
||||||
bool format_specifier_found = false;
|
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])
|
if('%' == filename[i])
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ string sanitize_filename(const string & filename)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// We haven't found the format specifier yet, so see if we can use this one as a valid formatter
|
// 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;
|
string tmp;
|
||||||
tmp.push_back('%');
|
tmp.push_back('%');
|
||||||
while(++i < filename.size())
|
while(++i < filename.size())
|
||||||
@ -99,11 +99,11 @@ string sanitize_filename(const string & filename)
|
|||||||
|
|
||||||
bool contains_integer_placeholder(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])
|
if('%' == filename[i])
|
||||||
{
|
{
|
||||||
int original_i = i;
|
size_t original_i = i;
|
||||||
char last_char = '%';
|
char last_char = '%';
|
||||||
while(++i < filename.size())
|
while(++i < filename.size())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user