mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
clang-format
This commit is contained in:
@@ -15,13 +15,13 @@
|
||||
#ifndef PLATFORM_IMPL_LINUX_ATOMIC_BOOLEAN_H_
|
||||
#define PLATFORM_IMPL_LINUX_ATOMIC_BOOLEAN_H_
|
||||
|
||||
#include "internal/platform/implementation/atomic_boolean.h"
|
||||
#include <atomic>
|
||||
#include "internal/platform/implementation/atomic_boolean.h"
|
||||
namespace nearby {
|
||||
namespace linux {
|
||||
// A boolean value that may be updated atomically.
|
||||
class AtomicBoolean : public api::AtomicBoolean {
|
||||
public:
|
||||
public:
|
||||
AtomicBoolean(bool initial_value) : atomic_boolean_(initial_value) {}
|
||||
~AtomicBoolean() override = default;
|
||||
|
||||
@@ -31,11 +31,11 @@ public:
|
||||
// Atomically exchange original value with a new one. Return previous value.
|
||||
bool Set(bool value) override { return atomic_boolean_.exchange(value); };
|
||||
|
||||
private:
|
||||
private:
|
||||
std::atomic_bool atomic_boolean_ = false;
|
||||
};
|
||||
|
||||
} // namespace linux
|
||||
} // namespace nearby
|
||||
} // namespace linux
|
||||
} // namespace nearby
|
||||
|
||||
#endif // PLATFORM_IMPL_LINUX_ATOMIC_BOOLEAN_H_
|
||||
#endif // PLATFORM_IMPL_LINUX_ATOMIC_BOOLEAN_H_
|
||||
|
||||
Reference in New Issue
Block a user