From ec2b6465c9b6475b73f4a28cc658af3507765e80 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 27 Dec 2016 19:06:23 +0300 Subject: Alarms: - warning fixes; - code cleaning --- plugins/Alarms/src/time_utils.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins/Alarms/src/time_utils.cpp') diff --git a/plugins/Alarms/src/time_utils.cpp b/plugins/Alarms/src/time_utils.cpp index c25a281fe5..1960cf04f4 100644 --- a/plugins/Alarms/src/time_utils.cpp +++ b/plugins/Alarms/src/time_utils.cpp @@ -3,23 +3,21 @@ SYSTEMTIME last_check; -bool IsBetween(SYSTEMTIME &time, SYSTEMTIME &start, SYSTEMTIME &end) { - +bool IsBetween(SYSTEMTIME &time, SYSTEMTIME &start, SYSTEMTIME &end) +{ FILETIME ft_time, ft_start, ft_end; - SystemTimeToFileTime(&time, &ft_time); SystemTimeToFileTime(&start, &ft_start); SystemTimeToFileTime(&end, &ft_end); - return (CompareFileTime(&ft_time, &ft_start) > 0 && CompareFileTime(&ft_time, &ft_end) <= 0); + return CompareFileTime(&ft_time, &ft_start) > 0 && CompareFileTime(&ft_time, &ft_end) <= 0; } -bool IsBefore(SYSTEMTIME &time, SYSTEMTIME &start) { +bool IsBefore(SYSTEMTIME &time, SYSTEMTIME &start) +{ FILETIME ft_time, ft_start; - SystemTimeToFileTime(&time, &ft_time); SystemTimeToFileTime(&start, &ft_start); - return (CompareFileTime(&ft_time, &ft_start) < 0); + return CompareFileTime(&ft_time, &ft_start) < 0; } - -- cgit v1.2.3