aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-02 22:44:45 -0400
committerJack Lloyd <[email protected]>2017-10-02 22:44:45 -0400
commitfb356397613e3d64bdd78a32ebd521438b450764 (patch)
tree8fc95da3799a43827632073acc676e16b83d247a /src
parenteeb170aa57a4acfba1d286281196e27e65814b8f (diff)
Remove needless block
Diffstat (limited to 'src')
-rw-r--r--src/lib/utils/calendar.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/lib/utils/calendar.cpp b/src/lib/utils/calendar.cpp
index a69be3431..1ff5a642d 100644
--- a/src/lib/utils/calendar.cpp
+++ b/src/lib/utils/calendar.cpp
@@ -53,17 +53,13 @@ std::time_t boost_timegm(std::tm *tm)
const int mon = tm->tm_mon + 1;
const int year = tm->tm_year + 1900;
- std::time_t out;
-
- {
- using namespace boost::posix_time;
- using namespace boost::gregorian;
- const auto epoch = ptime(date(1970, 01, 01));
- const auto time = ptime(date(year, mon, day),
- hours(hour) + minutes(min) + seconds(sec));
- const time_duration diff(time - epoch);
- out = diff.ticks() / diff.ticks_per_second();
- }
+ using namespace boost::posix_time;
+ using namespace boost::gregorian;
+ const auto epoch = ptime(date(1970, 01, 01));
+ const auto time = ptime(date(year, mon, day),
+ hours(hour) + minutes(min) + seconds(sec));
+ const time_duration diff(time - epoch);
+ std::time_t out = diff.ticks() / diff.ticks_per_second();
return out;
}