Skip to content

Commit 49171c7

Browse files
committed
fix a possible ODR issue
1 parent 124261c commit 49171c7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

rest/controller/MeterReadingController.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
namespace http = boost::beast::http;
1717

1818
namespace detail {
19-
auto toRfc3339(std::chrono::time_point<std::chrono::system_clock> time) {
19+
inline auto toRfc3339(std::chrono::time_point<std::chrono::system_clock> time) {
2020
return date::format("%FT%TZ", time);
2121
}
2222

23-
auto fromRfc3339(const std::string &time) {
23+
inline auto fromRfc3339(const std::string &time) {
2424
std::chrono::time_point<std::chrono::system_clock> tp;
2525
std::istringstream ss(time);
2626
ss >> date::parse("%FT%TZ", tp);
2727
return tp;
2828
}
2929

30-
auto renderReadingAsJson(const ElectricityReading &r) {
30+
inline auto renderReadingAsJson(const ElectricityReading &r) {
3131
return nlohmann::json{{"time", toRfc3339(r.getTime())}, {"reading", double(r.getReading()) / 10000}};
3232
}
3333
} // namespace detail

0 commit comments

Comments
 (0)