Code Cleanup

- Used File object inside Sensor.
This commit is contained in:
Paul Beckingham 2010-12-31 17:25:13 -05:00
parent 8543bd457b
commit 98f3e6e61d

View file

@ -26,7 +26,8 @@
////////////////////////////////////////////////////////////////////////////////
#include <sys/stat.h>
#include "Sensor.h"
#include <File.h>
#include <Sensor.h>
////////////////////////////////////////////////////////////////////////////////
Sensor::Sensor ()
@ -83,11 +84,7 @@ void Sensor::fileDeletion (const std::string&)
////////////////////////////////////////////////////////////////////////////////
time_t Sensor::getModification ()
{
struct stat s = {0};
if (0 == stat (_file.c_str (), &s))
return s.st_mtime;
return 0;
return File (_file).mtime ();
}
////////////////////////////////////////////////////////////////////////////////