about summary refs log tree commit diff
path: root/absl/flags/internal/private_handle_accessor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/internal/private_handle_accessor.cc')
-rw-r--r--absl/flags/internal/private_handle_accessor.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/absl/flags/internal/private_handle_accessor.cc b/absl/flags/internal/private_handle_accessor.cc
index 64fe31663a0a..a7eb58b6d45f 100644
--- a/absl/flags/internal/private_handle_accessor.cc
+++ b/absl/flags/internal/private_handle_accessor.cc
@@ -15,6 +15,14 @@
 
 #include "absl/flags/internal/private_handle_accessor.h"
 
+#include <memory>
+#include <string>
+
+#include "absl/base/config.h"
+#include "absl/flags/commandlineflag.h"
+#include "absl/flags/internal/commandlineflag.h"
+#include "absl/strings/string_view.h"
+
 namespace absl {
 ABSL_NAMESPACE_BEGIN
 namespace flags_internal {
@@ -24,8 +32,8 @@ FlagFastTypeId PrivateHandleAccessor::TypeId(const CommandLineFlag& flag) {
 }
 
 std::unique_ptr<FlagStateInterface> PrivateHandleAccessor::SaveState(
-    CommandLineFlag* flag) {
-  return flag->SaveState();
+    CommandLineFlag& flag) {
+  return flag.SaveState();
 }
 
 bool PrivateHandleAccessor::IsSpecifiedOnCommandLine(
@@ -43,12 +51,12 @@ void PrivateHandleAccessor::CheckDefaultValueParsingRoundtrip(
   flag.CheckDefaultValueParsingRoundtrip();
 }
 
-bool PrivateHandleAccessor::ParseFrom(CommandLineFlag* flag,
+bool PrivateHandleAccessor::ParseFrom(CommandLineFlag& flag,
                                       absl::string_view value,
                                       flags_internal::FlagSettingMode set_mode,
                                       flags_internal::ValueSource source,
-                                      std::string* error) {
-  return flag->ParseFrom(value, set_mode, source, error);
+                                      std::string& error) {
+  return flag.ParseFrom(value, set_mode, source, error);
 }
 
 }  // namespace flags_internal