Replace use of deprecated C Standard library headers in C++ code.
Change-Id: I9fa6630c7e4bdb2897df34d417635d8c7d8253bc
Signed-off-by: Tyler Chatow <tchatow@gmail.com>
diff --git a/aos/events/event_loop_tmpl.h b/aos/events/event_loop_tmpl.h
index c509170..698191e 100644
--- a/aos/events/event_loop_tmpl.h
+++ b/aos/events/event_loop_tmpl.h
@@ -1,9 +1,8 @@
#ifndef AOS_EVENTS_EVENT_LOOP_TMPL_H_
#define AOS_EVENTS_EVENT_LOOP_TMPL_H_
-#include <inttypes.h>
-#include <stdint.h>
-
+#include <cinttypes>
+#include <cstdint>
#include <type_traits>
#include "aos/events/event_loop.h"
@@ -37,9 +36,8 @@
template <typename Watch>
void EventLoop::MakeWatcher(const std::string_view channel_name, Watch &&w) {
- using MessageType =
- typename event_loop_internal::watch_message_type_trait<decltype(
- &Watch::operator())>::message_type;
+ using MessageType = typename event_loop_internal::watch_message_type_trait<
+ decltype(&Watch::operator())>::message_type;
const Channel *channel = configuration::GetChannel(
configuration_, channel_name, MessageType::GetFullyQualifiedName(),
name(), node());
diff --git a/aos/events/logging/log_reader.cc b/aos/events/logging/log_reader.cc
index efcb40a..8a8f5af 100644
--- a/aos/events/logging/log_reader.cc
+++ b/aos/events/logging/log_reader.cc
@@ -1,11 +1,11 @@
#include "aos/events/logging/log_reader.h"
#include <fcntl.h>
-#include <limits.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/uio.h>
+#include <climits>
#include <vector>
#include "absl/strings/escaping.h"
@@ -45,7 +45,7 @@
// want to re-implement it.
void HandleMaps(const flatbuffers::Vector<flatbuffers::Offset<aos::Map>> *maps,
std::string *name, std::string_view type, const Node *node);
-}
+} // namespace configuration
namespace logger {
namespace {
@@ -396,9 +396,9 @@
// running until the last node.
for (std::unique_ptr<State> &state : states_) {
- VLOG(1) << "Start time is " << state->monotonic_start_time(0) << " for node "
- << MaybeNodeName(state->event_loop()->node()) << "now "
- << state->monotonic_now();
+ VLOG(1) << "Start time is " << state->monotonic_start_time(0)
+ << " for node " << MaybeNodeName(state->event_loop()->node())
+ << "now " << state->monotonic_now();
if (state->monotonic_start_time(0) == monotonic_clock::min_time) {
continue;
}
@@ -459,9 +459,9 @@
state->SetRealtimeOffset(state->monotonic_start_time(0),
state->realtime_start_time(0));
}
- VLOG(1) << "Start time is " << state->monotonic_start_time(0) << " for node "
- << MaybeNodeName(state->event_loop()->node()) << "now "
- << state->monotonic_now();
+ VLOG(1) << "Start time is " << state->monotonic_start_time(0)
+ << " for node " << MaybeNodeName(state->event_loop()->node())
+ << "now " << state->monotonic_now();
}
if (FLAGS_timestamps_to_csv) {
@@ -1188,7 +1188,8 @@
} search;
CHECK_EQ(timestamped_message.monotonic_remote_time.boot, 0u);
- search.monotonic_event_time = timestamped_message.monotonic_remote_time.time;
+ search.monotonic_event_time =
+ timestamped_message.monotonic_remote_time.time;
search.queue_index = timestamped_message.remote_queue_index;
// Find the sent time if available.