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

fixed missing include causing ci build to fail; cleaned up warnings about signed/unsigned comparison; cleaned up local string declarations

This commit is contained in:
Ryan Morlok 2013-03-17 23:51:14 -05:00
parent 4614e0c18d
commit c0972e1baa

View File

@ -8,6 +8,7 @@
#include <errno.h> #include <errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <cstring>
#include "path.h" #include "path.h"
@ -41,10 +42,10 @@ void create_directories(const string & path)
string sanitize_filename(const string & filename) string sanitize_filename(const string & filename)
{ {
string sanitized = string(); string sanitized;
bool format_specifier_found = false; bool format_specifier_found = false;
for(int i = 0; i < filename.size(); i++) for(uint i = 0; i < filename.size(); i++)
{ {
if('%' == filename[i]) if('%' == filename[i])
{ {
@ -57,7 +58,7 @@ string sanitize_filename(const string & filename)
{ {
// 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; int original_i = i;
string tmp(""); string tmp;
tmp.push_back('%'); tmp.push_back('%');
while(++i < filename.size()) while(++i < filename.size())
{ {