Fix more OSS warnings and build errors

-Wc++98-compat-extra-semi
* in type_map.h

-Winconsistent-missing-override
* in gl_texture_buffer.h

-Wdeprecated-declarations
* usage of (absl) Status in
  * status_util.cc
  * api2/packet.h
  * output_stream_shard.cc

-Wimplicit-const-int-float-conversion
* Adds a static_cast to handle the precision loss when converting from large ints to floating point

ANNOTATE_THREAD_NAME
* explicitly uses ABSL_ANNOTATE_THREAD_NAME instead. This is useful in Chromium's build where there are multiple ANNOTATE_THREAD_NAME symbols

Also ran clang-format over all of each edited file

PiperOrigin-RevId: 537351290
This commit is contained in:
MediaPipe Team
2023-06-02 10:46:42 -07:00
committed by Copybara-Service
parent 9045a74ba3
commit 280bd320b4
7 changed files with 28 additions and 25 deletions
+8 -8
View File
@@ -165,7 +165,7 @@ template <class V, class... U>
struct IsCompatibleType<V, OneOf<U...>>
: std::integral_constant<bool, (std::is_same_v<V, U> || ...)> {};
}; // namespace internal
} // namespace internal
template <typename T>
inline Packet<T> PacketBase::As() const {
@@ -259,19 +259,19 @@ struct First {
template <class T>
struct AddStatus {
using type = StatusOr<T>;
using type = absl::StatusOr<T>;
};
template <class T>
struct AddStatus<StatusOr<T>> {
using type = StatusOr<T>;
struct AddStatus<absl::StatusOr<T>> {
using type = absl::StatusOr<T>;
};
template <>
struct AddStatus<Status> {
using type = Status;
struct AddStatus<absl::Status> {
using type = absl::Status;
};
template <>
struct AddStatus<void> {
using type = Status;
using type = absl::Status;
};
template <class R, class F, class... A>
@@ -282,7 +282,7 @@ struct CallAndAddStatusImpl {
};
template <class F, class... A>
struct CallAndAddStatusImpl<void, F, A...> {
Status operator()(const F& f, A&&... a) {
absl::Status operator()(const F& f, A&&... a) {
f(std::forward<A>(a)...);
return {};
}