Reduce usage of std::bind()
C++14 lambdas are easier to read, easier to debug,
and can usually be better optimized by the compiler.
Change-Id: I294f275904f91942a8de946fe63e77078a7608a6
diff --git a/tools/nfdc/format-helpers.cpp b/tools/nfdc/format-helpers.cpp
index fa72512..a207bf8 100644
--- a/tools/nfdc/format-helpers.cpp
+++ b/tools/nfdc/format-helpers.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2021, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -110,9 +110,9 @@
}
std::string
-formatTimestamp(time::system_clock::TimePoint t)
+formatTimestamp(time::system_clock::time_point t)
{
- return time::toString(t, "%Y-%m-%dT%H:%M:%S%F");
+ return time::toIsoExtendedString(t);
}
} // namespace xml
@@ -199,7 +199,7 @@
}
std::string
-formatTimestamp(time::system_clock::TimePoint t)
+formatTimestamp(time::system_clock::time_point t)
{
return time::toIsoString(t);
}