summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRALOVICH, Kristof <tade60@freemail.hu>2013-08-08 12:51:59 +0200
committerRALOVICH, Kristof <tade60@freemail.hu>2013-08-08 12:51:59 +0200
commitdc66ac53670c514cab8a53ecf0d6c12e78b6eced (patch)
treef3bb93db391e6ce422d906733c2fb3a7161806ee
parentc42c10024d850704423d8db1d471c609168b2781 (diff)
FIT: fix build under gcc 4.4.5
-rw-r--r--src/FIT.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/FIT.cpp b/src/FIT.cpp
index a145273..20937f9 100644
--- a/src/FIT.cpp
+++ b/src/FIT.cpp
@@ -1164,6 +1164,12 @@ bool FIT::parse(vector<uint8_t> &fitData, GPX &gpx)
return true;
}
+struct DateSorter
+{
+ bool operator()(const ZeroFileRecord& a, const ZeroFileRecord& b) const
+ { return a.timeStamp > b.timeStamp; }
+} dateSorter;
+
bool FIT::parseZeroFile(vector<uint8_t> &data, ZeroFileContent &zeroFileContent)
{
@@ -1222,10 +1228,6 @@ bool FIT::parseZeroFile(vector<uint8_t> &data, ZeroFileContent &zeroFileContent)
zeroFileContent.zfRecords.push_back(zfRecord);
}
- struct DateSorter
- {
- bool operator()(const ZeroFileRecord& a, const ZeroFileRecord& b) { return a.timeStamp > b.timeStamp; }
- } dateSorter;
std::sort(zeroFileContent.zfRecords.begin(), zeroFileContent.zfRecords.end(), dateSorter);
for(size_t i = 0; i < zeroFileContent.zfRecords.size(); i++)