@@ -80,8 +80,8 @@ std::expected<rel_time, error_container> parse_interval(std::string_view interva
8080 int r{}; // it's intentionally declared as 'int' since timelib_strtointerval accepts 'int'
8181 timelib_error_container* errors{nullptr };
8282
83- kphp::memory::libc_alloc_guard{},
84- timelib_strtointerval (interval_sv. data (), interval_sv. size (), std::addressof (b), std::addressof (e), std::addressof (p), std::addressof (r), std::addressof (errors));
83+ kphp::memory::libc_alloc_guard{}, timelib_strtointerval (interval_sv. data (), interval_sv. size (), std::addressof (b), std::addressof (e), std::addressof (p),
84+ std::addressof (r), std::addressof (errors));
8585
8686 if (errors->error_count > 0 ) {
8787 kphp::timelib::details::rel_time_destructor{}(p);
@@ -101,8 +101,8 @@ std::expected<rel_time, error_container> parse_interval(std::string_view interva
101101 return std::unexpected{error_container{errors}};
102102}
103103
104- time add (const kphp::timelib::time& t, timelib_rel_time & interval) noexcept {
105- time new_time{(kphp::memory::libc_alloc_guard{}, timelib_add (t.get (), std::addressof ( interval)))};
104+ time add_time_interval (const kphp::timelib::time& t, const kphp::timelib::rel_time & interval) noexcept {
105+ time new_time{(kphp::memory::libc_alloc_guard{}, timelib_add (t.get (), interval. get ( )))};
106106 return new_time;
107107}
108108
@@ -372,12 +372,12 @@ void set_time(const kphp::timelib::time& t, int64_t h, int64_t i, int64_t s, int
372372 kphp::memory::libc_alloc_guard{}, timelib_update_ts (t.get (), nullptr );
373373}
374374
375- std::expected<time, std::string_view> sub (const kphp::timelib::time& t, timelib_rel_time & interval) noexcept {
376- if (interval. have_special_relative ) {
375+ std::expected<time, std::string_view> sub_time_interval (const kphp::timelib::time& t, const kphp::timelib::rel_time & interval) noexcept {
376+ if (interval-> have_special_relative ) {
377377 return std::unexpected{" Only non-special relative time specifications are supported for subtraction" };
378378 }
379379
380- time new_time{(kphp::memory::libc_alloc_guard{}, timelib_sub (t.get (), std::addressof ( interval)))};
380+ time new_time{(kphp::memory::libc_alloc_guard{}, timelib_sub (t.get (), interval. get ( )))};
381381 return new_time;
382382}
383383
0 commit comments