diff options
author | Abseil Team <absl-team@google.com> | 2019-09-06T09·25-0700 |
---|---|---|
committer | Gennadiy Rozental <rogeeff@google.com> | 2019-09-06T11·28-0400 |
commit | 325fd7b042ff4ec34f7dd32e602cd81ad0e24b22 (patch) | |
tree | 8abf822f0f1fc3cbaaca59f8dc9969f394761410 /absl/flags/internal/commandlineflag.cc | |
parent | 83c1d65c90a92aa49632b9ac5a793214bb0768bc (diff) |
Export of internal Abseil changes
-- 2e894f3c2fadc789abf9011222526d5da1e0433e by Gennadiy Rozental <rogeeff@google.com>: Internal change PiperOrigin-RevId: 267557172 -- 535be36d401a556156223ecc1aabd73a271f0f05 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 267456795 GitOrigin-RevId: 2e894f3c2fadc789abf9011222526d5da1e0433e Change-Id: I95d29cbde5cd8342ae71b77728baa61b7cf6d440
Diffstat (limited to 'absl/flags/internal/commandlineflag.cc')
-rw-r--r-- | absl/flags/internal/commandlineflag.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/absl/flags/internal/commandlineflag.cc b/absl/flags/internal/commandlineflag.cc index ae6a8d70fbf1..53e2b84ecc13 100644 --- a/absl/flags/internal/commandlineflag.cc +++ b/absl/flags/internal/commandlineflag.cc @@ -261,13 +261,6 @@ bool CommandLineFlag::SetFromString(absl::string_view value, return true; } -void CommandLineFlag::StoreAtomic(size_t size) { - int64_t t = 0; - assert(size <= sizeof(int64_t)); - memcpy(&t, cur_, size); - atomic_.store(t, std::memory_order_release); -} - void CommandLineFlag::CheckDefaultValueParsingRoundtrip() const { std::string v = DefaultValue(); @@ -305,8 +298,6 @@ bool CommandLineFlag::ValidateInputValue(absl::string_view value) const { return result; } -const int64_t CommandLineFlag::kAtomicInit; - void CommandLineFlag::Read(void* dst, const flags_internal::FlagOpFn dst_op) const { absl::ReaderMutexLock l(InitFlagIfNecessary()); @@ -369,7 +360,7 @@ std::string HelpText::GetHelpText() const { void UpdateCopy(CommandLineFlag* flag) { #define STORE_ATOMIC(T) \ else if (flag->IsOfType<T>()) { \ - flag->StoreAtomic(sizeof(T)); \ + flag->StoreAtomic(); \ } if (false) { |