diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-27 19:06:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-27 19:06:23 +0300 |
commit | ec2b6465c9b6475b73f4a28cc658af3507765e80 (patch) | |
tree | 0a8ea58bef971ccedb66dbb1af067c8e20a44857 /plugins/Alarms/src/time_utils.cpp | |
parent | 955c6cd5ad96179f8fab08006027a2e0c0afb3b0 (diff) |
Alarms:
- warning fixes;
- code cleaning
Diffstat (limited to 'plugins/Alarms/src/time_utils.cpp')
-rw-r--r-- | plugins/Alarms/src/time_utils.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
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;
}
-
|