Fix compiler warnings (mainly signed/unsigned comparisons)

This commit is contained in:
Peter Wu 2012-08-25 19:21:58 +02:00
parent 9b3037d0e4
commit 689eb74945
4 changed files with 8 additions and 6 deletions

View file

@ -61,10 +61,10 @@ void Util::Config::addOption(std::string optname, JSON::Value option){
/// Prints a usage message to the given output.
void Util::Config::printHelp(std::ostream & output){
int longest = 0;
unsigned int longest = 0;
std::map<long long int, std::string> args;
for (JSON::ObjIter it = vals.ObjBegin(); it != vals.ObjEnd(); it++){
int current = 0;
unsigned int current = 0;
if (it->second.isMember("long")){current += it->second["long"].asString().size() + 4;}
if (it->second.isMember("short")){current += it->second["short"].asString().size() + 3;}
if (current > longest){longest = current;}