Skip to content

Commit 8c372cc

Browse files
committed
linter warnings...........
1 parent 6755cd6 commit 8c372cc

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/viam/sdk/log/private/log_backend.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ namespace sdk {
88
namespace impl {
99

1010
time_pt ptime_convert(const boost::posix_time::ptime& from) {
11-
boost::posix_time::time_duration const time_since_epoch =
12-
from - boost::posix_time::from_time_t(0);
13-
time_pt t = std::chrono::system_clock::from_time_t(time_since_epoch.total_seconds());
14-
long nsec =
15-
time_since_epoch.fractional_seconds() * (1000000000 / time_since_epoch.ticks_per_second());
11+
namespace posix_time = boost::posix_time;
12+
13+
posix_time::time_duration const time_since_epoch = from - posix_time::from_time_t(0);
14+
const time_pt t = std::chrono::system_clock::from_time_t(time_since_epoch.total_seconds());
15+
const long nsec = time_since_epoch.fractional_seconds() *
16+
(1000000000 / posix_time::time_duration::ticks_per_second());
1617
return t + std::chrono::nanoseconds(nsec);
1718
}
1819

19-
void LogBackend::consume(const boost::log::record_view& rec) {
20+
void LogBackend::consume(const boost::log::record_view& rec) const {
2021
parent->log(*rec[attr_channel_type{}],
2122
to_string(*rec[attr_sev_type{}]),
2223
*rec[boost::log::expressions::smessage],

src/viam/sdk/log/private/log_backend.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ using SinkType = boost::log::sinks::synchronous_sink<LogBackend>;
1818
struct LogBackend : boost::log::sinks::basic_sink_backend<boost::log::sinks::synchronized_feeding> {
1919
LogBackend(RobotClient* p) : parent(p) {}
2020

21-
void consume(const boost::log::record_view&);
21+
void consume(const boost::log::record_view&) const;
2222

2323
static boost::shared_ptr<SinkType> create(RobotClient* p);
2424

0 commit comments

Comments
 (0)