Clean up post-C++-17 upgrade
-There was a TODO to remove a const_cast
-Remove a bunch of -pthread uses, because they were apparently unneeded.
Change-Id: I4cd28ccfb487eb0c7acb3b629e090c5e8a1b2acc
diff --git a/aos/BUILD b/aos/BUILD
index 4f87873..8683d18 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -234,9 +234,6 @@
hdrs = [
"complex_thread_local.h",
],
- linkopts = [
- "-lpthread",
- ],
visibility = ["//visibility:public"],
deps = [
"//aos:die",
@@ -308,10 +305,10 @@
":flatbuffer_merge",
":flatbuffers",
":json_to_flatbuffer",
- "@com_google_absl//absl/base",
"//aos:unique_malloc_ptr",
"//aos/util:file",
"@com_github_google_glog//:glog",
+ "@com_google_absl//absl/base",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/strings",
],
diff --git a/aos/flatbuffers.h b/aos/flatbuffers.h
index b48dc1f..ff2dced 100644
--- a/aos/flatbuffers.h
+++ b/aos/flatbuffers.h
@@ -144,11 +144,7 @@
const uint8_t *data() const override {
return reinterpret_cast<const uint8_t *>(data_.data());
}
- uint8_t *data() override {
- // TODO(james): when we get c++17, can we drop the second cast?
- return const_cast<uint8_t *>(
- reinterpret_cast<const uint8_t *>(data_.data()));
- }
+ uint8_t *data() override { return reinterpret_cast<uint8_t *>(data_.data()); }
size_t size() const override { return data_.size(); }
private: