Skip to content

Commit

Permalink
antpm: tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristof Ralovich committed Aug 2, 2023
1 parent 7bff454 commit 279c301
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions src/AntMessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -681,12 +681,10 @@ AntMessage::saveAsAntParse(std::ostream& os, const Container& messages)
CHECK_RETURN_FALSE(os.good());

std::chrono::time_point<std::chrono::system_clock> t0;
//boost::system_time t0;
for(typename Container::const_iterator i=messages.begin(); i!= messages.end(); i++)
{
if(i==messages.begin())
t0=i->timestamp;
//boost::system_time t1 = i->timestamp;
std::chrono::time_point<std::chrono::system_clock> t1 = i->timestamp;
auto td = t1 - t0;
t0 = t1;
Expand Down Expand Up @@ -798,7 +796,6 @@ AntFsFile::saveToFile(const char* fileName /* = "antfs.bin" */)
if(1 != fwrite(&bytes[0], bytes.size(), 1 , f)) { LOG(LOG_ERR) << "truncated fwrite\n"; fclose(f); return false; }
fclose(f);

//FIT fit;
std::time_t ct=0;
CHECK_RETURN_FALSE(FIT::getCreationDate(bytes, ct));
char fit_timestamp[256];
Expand All @@ -811,7 +808,7 @@ AntFsFile::saveToFile(const char* fileName /* = "antfs.bin" */)
}

bool
GFile::saveToFile(const char* fileName /* = "antfs.bin" */)
GFile::saveToFile(const char* fileName)
{
logger() << "Saving '" << fileName << "'...\n";
if(bytes.empty()) { LOG(LOG_ERR) << "nothing to save\n"; return false; }
Expand Down
2 changes: 1 addition & 1 deletion src/AntMessage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ struct AntFsFile
struct GFile
{
std::vector<uchar> bytes;
bool saveToFile(const char* fileName = "antfs.bin");
bool saveToFile(const char* fileName);
};

}
2 changes: 0 additions & 2 deletions src/antpm-fit2gpx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@
#include "Log.hpp"

#include <boost/program_options.hpp>
//#include <boost/filesystem.hpp>
#include <boost/exception/diagnostic_information.hpp>

namespace po = boost::program_options;
//namespace fs = boost::filesystem;
namespace fs = std::filesystem;
using namespace std;
using namespace antpm;
Expand Down

0 comments on commit 279c301

Please sign in to comment.