From 4a49a5587df3077dce0beea64eb055b328a7a2c1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 May 2019 16:08:54 +0200 Subject: [PATCH] time/Convert: add `pure` attributes --- src/time/Convert.hxx | 4 ++++ 1 file changed, 4 insertions(+) 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 /** @@ -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);