summaryrefslogtreecommitdiff
path: root/src/time
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-05-08 16:08:54 +0200
committerMax Kellermann <max@musicpd.org>2019-12-16 23:02:38 +0100
commite7411c0c4b325a6b1316d60a16184b70263c61bd (patch)
treeaf061dc0b27cdaa223c2a0e6bba506ddcdfd58ad /src/time
parente9af692973a5db95ac1b07f430fd801c0c07dac9 (diff)
time/Convert: add `pure` attributes
Diffstat (limited to 'src/time')
-rw-r--r--src/time/Convert.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/time/Convert.hxx b/src/time/Convert.hxx
index 5f75cd40f..bbe893bee 100644
--- a/src/time/Convert.hxx
+++ b/src/time/Convert.hxx
@@ -33,6 +33,8 @@
#ifndef TIME_CONVERT_HXX
#define TIME_CONVERT_HXX
+#include "util/Compiler.h"
+
#include <chrono>
/**
@@ -52,6 +54,7 @@ LocalTime(std::chrono::system_clock::time_point tp);
/**
* Convert a UTC-based "struct tm" to a UTC-based time point.
*/
+gcc_pure
std::chrono::system_clock::time_point
TimeGm(struct tm &tm);
@@ -60,6 +63,7 @@ TimeGm(struct tm &tm);
/**
* Convert a local "struct tm" to a UTC-based time point.
*/
+gcc_pure
std::chrono::system_clock::time_point
MakeTime(struct tm &tm);