Remove uses of ATOMIC_VAR_INIT

ATOMIC_VAR_INIT has a trivial definition
`#define ATOMIC_VAR_INIT(value) (value)`,
is deprecated in C17/C++20, and will be removed in newer standards in
newer GCC/Clang (e.g. https://reviews.llvm.org/D144196).

PiperOrigin-RevId: 525534393
This commit is contained in:
MediaPipe Team
2023-04-19 13:26:47 -07:00
committed by Copybara-Service
parent 5bd3282515
commit 476c7efc18
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -454,8 +454,8 @@ class GlContext : public std::enable_shared_from_this<GlContext> {
// Number of glFinish calls completed on the GL thread.
// Changes should be guarded by mutex_. However, we use simple atomic
// loads for efficiency on the fast path.
std::atomic<int64_t> gl_finish_count_ = ATOMIC_VAR_INIT(0);
std::atomic<int64_t> gl_finish_count_target_ = ATOMIC_VAR_INIT(0);
std::atomic<int64_t> gl_finish_count_ = 0;
std::atomic<int64_t> gl_finish_count_target_ = 0;
GlContext* context_waiting_on_ ABSL_GUARDED_BY(mutex_) = nullptr;