Clang-format aos
It has drifted... Clean it up a bit.
Change-Id: I2fe31a2187b4f690634ae6942786575db20192af
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/network/log_web_proxy_main.cc b/aos/network/log_web_proxy_main.cc
index 945d034..782c2be 100644
--- a/aos/network/log_web_proxy_main.cc
+++ b/aos/network/log_web_proxy_main.cc
@@ -1,7 +1,8 @@
// Sample binary for running the web server code against a logfile.
// This can be run by running
-// bazel run -c opt //aos/network:log_web_proxy_main -- --node node_to_replay /path/to/logfile
-// And then opening the plotting webpage at http://localhost:8080/graph.html
+// bazel run -c opt //aos/network:log_web_proxy_main -- --node node_to_replay
+// /path/to/logfile And then opening the plotting webpage at
+// http://localhost:8080/graph.html
#include "aos/configuration.h"
#include "aos/events/logging/log_reader.h"
diff --git a/aos/network/message_bridge_client.cc b/aos/network/message_bridge_client.cc
index 503ce95..8aad867 100644
--- a/aos/network/message_bridge_client.cc
+++ b/aos/network/message_bridge_client.cc
@@ -1,8 +1,7 @@
-#include "aos/network/message_bridge_client_lib.h"
-
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
#include "aos/logging/dynamic_logging.h"
+#include "aos/network/message_bridge_client_lib.h"
DEFINE_string(config, "aos_config.json", "Path to the config.");
DEFINE_int32(rt_priority, -1, "If > 0, run as this RT priority");
diff --git a/aos/network/message_bridge_test.cc b/aos/network/message_bridge_test.cc
index d2a9b05..226daf7 100644
--- a/aos/network/message_bridge_test.cc
+++ b/aos/network/message_bridge_test.cc
@@ -457,8 +457,7 @@
examples::Ping::Builder ping_builder =
builder.MakeBuilder<examples::Ping>();
ping_builder.add_value(ping_count + 971);
- EXPECT_EQ(builder.Send(ping_builder.Finish()),
- RawSender::Error::kOk);
+ EXPECT_EQ(builder.Send(ping_builder.Finish()), RawSender::Error::kOk);
++ping_count;
}
});
@@ -1323,7 +1322,6 @@
->duplicate_packets(),
1u);
-
EXPECT_EQ(pi2_client_statistics_fetcher->connections()
->Get(0)
->partial_deliveries(),
diff --git a/aos/network/sctp_lib_test.cc b/aos/network/sctp_lib_test.cc
index ed3c15e..53b285f 100644
--- a/aos/network/sctp_lib_test.cc
+++ b/aos/network/sctp_lib_test.cc
@@ -1,4 +1,5 @@
#include "aos/network/sctp_lib.h"
+
#include "aos/init.h"
#include "gflags/gflags.h"
diff --git a/aos/network/timestamp_filter_test.cc b/aos/network/timestamp_filter_test.cc
index a5a4b98..07ea682 100644
--- a/aos/network/timestamp_filter_test.cc
+++ b/aos/network/timestamp_filter_test.cc
@@ -692,14 +692,11 @@
ASSERT_EQ(filter.timestamps_size(), 2u);
filter.FreezeUntil(tb, {0, monotonic_clock::min_time});
- EXPECT_DEATH(
- {
- filter.Sample(tb, oa);
- },
- "monotonic_now > frozen_time_ \\(0.100000000sec vs. "
- "0.100000000sec\\) : test_a -> test_b Tried to insert "
- "0.100000000sec before the frozen time of 0.100000000sec. "
- "Increase --time_estimation_buffer_seconds to greater than 0");
+ EXPECT_DEATH({ filter.Sample(tb, oa); },
+ "monotonic_now > frozen_time_ \\(0.100000000sec vs. "
+ "0.100000000sec\\) : test_a -> test_b Tried to insert "
+ "0.100000000sec before the frozen time of 0.100000000sec. "
+ "Increase --time_estimation_buffer_seconds to greater than 0");
}
{
@@ -712,9 +709,7 @@
filter.FreezeUntil(tc, {0, monotonic_clock::min_time});
EXPECT_DEATH(
- {
- filter.Sample(tc, oc);
- },
+ { filter.Sample(tc, oc); },
"test_a -> test_b Returned a horizontal line previously and then got a "
"new sample at "
"0.200000000sec, 0.2 seconds after the last sample at 0.000000000sec");
@@ -730,9 +725,7 @@
filter.FreezeUntil(tc, {0, monotonic_clock::min_time});
EXPECT_DEATH(
- {
- filter.Sample(tb, ob);
- },
+ { filter.Sample(tb, ob); },
"monotonic_now > frozen_time_ \\(0.100000000sec vs. "
"0.200000000sec\\) : test_a -> test_b Tried to insert "
"0.100000000sec before the frozen time of 0.200000000sec. "
@@ -1041,9 +1034,10 @@
EXPECT_EQ(filter.Offset(t1, 0.0, 0), std::make_pair(o1, 0.0));
- EXPECT_EQ(filter.Offset(
- e + (t2.time_since_epoch() + t1.time_since_epoch()) / 2, 0.0, 0),
- std::make_pair(o1, (o2d - o1d) / 2.));
+ EXPECT_EQ(
+ filter.Offset(e + (t2.time_since_epoch() + t1.time_since_epoch()) / 2,
+ 0.0, 0),
+ std::make_pair(o1, (o2d - o1d) / 2.));
EXPECT_EQ(filter.Offset(t2, 0.0, 0), std::make_pair(o2, 0.0));
diff --git a/aos/network/web_proxy.cc b/aos/network/web_proxy.cc
index 30707b2..7161ee3 100644
--- a/aos/network/web_proxy.cc
+++ b/aos/network/web_proxy.cc
@@ -208,7 +208,6 @@
return;
}
-
while (fetcher_->FetchNext()) {
// If we aren't building up a buffer, short-circuit the FetchNext().
if (buffer_size_ == 0) {
@@ -304,7 +303,8 @@
});
}
-void Subscriber::RemoveListener(std::shared_ptr<ScopedDataChannel> data_channel) {
+void Subscriber::RemoveListener(
+ std::shared_ptr<ScopedDataChannel> data_channel) {
channels_.erase(
std::remove_if(
channels_.begin(), channels_.end(),
@@ -636,8 +636,7 @@
CHECK(data_channel) << ": Subscriber got destroyed before we started.";
// Raw pointer inside the subscriber so we don't have a circular
// reference. AddListener will close it.
- subscribers_[channel_index]->AddListener(data_channel,
- transfer_method);
+ subscribers_[channel_index]->AddListener(data_channel, transfer_method);
});
Subscriber *subscriber = subscribers_[channel_index].get();
diff --git a/aos/network/web_proxy_utils.h b/aos/network/web_proxy_utils.h
index 19b496d..de64329 100644
--- a/aos/network/web_proxy_utils.h
+++ b/aos/network/web_proxy_utils.h
@@ -1,7 +1,7 @@
#include "absl/types/span.h"
-#include "aos/network/web_proxy_generated.h"
#include "aos/events/event_loop.h"
#include "aos/flatbuffers.h"
+#include "aos/network/web_proxy_generated.h"
namespace aos {
namespace web_proxy {