From c0972e1baa336792d86aec698d19d113b1c3f7c0 Mon Sep 17 00:00:00 2001 From: Ryan Morlok Date: Sun, 17 Mar 2013 23:51:14 -0500 Subject: [PATCH] fixed missing include causing ci build to fail; cleaned up warnings about signed/unsigned comparison; cleaned up local string declarations --- src/util/path.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/path.cc b/src/util/path.cc index eacc16c..7324385 100644 --- a/src/util/path.cc +++ b/src/util/path.cc @@ -8,6 +8,7 @@ #include #include #include +#include #include "path.h" @@ -41,10 +42,10 @@ void create_directories(const string & path) string sanitize_filename(const string & filename) { - string sanitized = string(); + string sanitized; bool format_specifier_found = false; - for(int i = 0; i < filename.size(); i++) + for(uint i = 0; i < filename.size(); 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 int original_i = i; - string tmp(""); + string tmp; tmp.push_back('%'); while(++i < filename.size()) {