Code Cleanup

- Converted atoi to strtol.
- Added include, which is causing tinderbox fail.
This commit is contained in:
Paul Beckingham 2011-04-01 23:30:12 -04:00
parent 38576ba08a
commit b63e92b540

View file

@ -28,6 +28,7 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <inttypes.h>
#include <Att.h> #include <Att.h>
#include <Context.h> #include <Context.h>
#include <main.h> #include <main.h>
@ -279,7 +280,7 @@ std::string renderAttribute (const std::string& name, const std::string& value)
if (a.type (name) == "date" && if (a.type (name) == "date" &&
value != "") value != "")
{ {
Date d ((time_t)::atoi (value.c_str ())); Date d ((time_t)::strtol (value.c_str (), NULL, 10));
return d.toString (context.config.get ("dateformat")); return d.toString (context.config.get ("dateformat"));
} }