Code Cleanup

- Minor edits.
This commit is contained in:
Paul Beckingham 2011-10-29 10:49:41 -04:00
parent ef68d1785f
commit 7f577e8885
3 changed files with 7 additions and 4 deletions

View file

@ -33,6 +33,7 @@
#include <algorithm>
#include <sys/types.h>
#include <sys/stat.h>
#include <inttypes.h>
#include <unistd.h>
#include <stdlib.h>
#include <pwd.h>
@ -633,7 +634,7 @@ const std::string Config::get (const std::string& key)
const int Config::getInteger (const std::string& key)
{
if ((*this).find (key) != (*this).end ())
return atoi ((*this)[key].c_str ());
return strtoimax ((*this)[key].c_str (), NULL, 10);
return 0;
}
@ -642,7 +643,7 @@ const int Config::getInteger (const std::string& key)
const double Config::getReal (const std::string& key)
{
if ((*this).find (key) != (*this).end ())
return atof ((*this)[key].c_str ());
return strtod ((*this)[key].c_str (), NULL);
return 0.0;
}

View file

@ -1,7 +1,8 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2011, Paul Beckingham, Federico Hernandez.
// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal

View file

@ -1,7 +1,8 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006-2011, Paul Beckingham, Federico Hernandez.
// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal