Export of internal Abseil changes
-- ea0cfebeb69b25bec343652bbe1a203f5476c51a by Mark Barolak <mbar@google.com>: Change "std::string" to "string" in places where a "std::" qualification was incorrectly inserted by automation. PiperOrigin-RevId: 300108520 GitOrigin-RevId: ea0cfebeb69b25bec343652bbe1a203f5476c51a Change-Id: Ie3621e63a6ebad67b9fe56a3ebe33e1d50dac602
This commit is contained in:
parent
d936052d32
commit
a877af1f29
68 changed files with 191 additions and 191 deletions
|
@ -141,7 +141,7 @@ class CommandLineFlag {
|
|||
// Returns name of the file where this flag is defined.
|
||||
virtual std::string Filename() const = 0;
|
||||
// Returns name of the flag's value type for some built-in types or empty
|
||||
// std::string.
|
||||
// string.
|
||||
virtual absl::string_view Typename() const = 0;
|
||||
// Returns help message associated with this flag.
|
||||
virtual std::string Help() const = 0;
|
||||
|
@ -163,7 +163,7 @@ class CommandLineFlag {
|
|||
// or nullptr if flag does not support saving and restoring a state.
|
||||
virtual std::unique_ptr<FlagStateInterface> SaveState() = 0;
|
||||
|
||||
// Sets the value of the flag based on specified std::string `value`. If the flag
|
||||
// Sets the value of the flag based on specified string `value`. If the flag
|
||||
// was successfully set to new value, it returns true. Otherwise, sets `error`
|
||||
// to indicate the error, leaves the flag unchanged, and returns false. There
|
||||
// are three ways to set the flag's value:
|
||||
|
@ -176,7 +176,7 @@ class CommandLineFlag {
|
|||
flags_internal::ValueSource source,
|
||||
std::string* error) = 0;
|
||||
|
||||
// Checks that flags default value can be converted to std::string and back to the
|
||||
// Checks that flags default value can be converted to string and back to the
|
||||
// flag's value type.
|
||||
virtual void CheckDefaultValueParsingRoundtrip() const = 0;
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ void FlagImpl::CheckDefaultValueParsingRoundtrip() const {
|
|||
ABSL_INTERNAL_LOG(
|
||||
FATAL,
|
||||
absl::StrCat("Flag ", Name(), " (from ", Filename(),
|
||||
"): std::string form of default value '", v,
|
||||
"): string form of default value '", v,
|
||||
"' could not be parsed; error=", error));
|
||||
}
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@ class FlagImpl {
|
|||
ABSL_EXCLUSIVE_LOCKS_REQUIRED(*DataGuard());
|
||||
// Flag initialization called via absl::call_once.
|
||||
void Init();
|
||||
// Attempts to parse supplied `value` std::string. If parsing is successful,
|
||||
// Attempts to parse supplied `value` string. If parsing is successful,
|
||||
// returns new value. Otherwise returns nullptr.
|
||||
std::unique_ptr<void, DynValueDeleter> TryParse(absl::string_view value,
|
||||
std::string* err) const
|
||||
|
|
|
@ -134,14 +134,14 @@ class FlagHelpPrettyPrinter {
|
|||
first_line_(true) {}
|
||||
|
||||
void Write(absl::string_view str, bool wrap_line = false) {
|
||||
// Empty std::string - do nothing.
|
||||
// Empty string - do nothing.
|
||||
if (str.empty()) return;
|
||||
|
||||
std::vector<absl::string_view> tokens;
|
||||
if (wrap_line) {
|
||||
for (auto line : absl::StrSplit(str, absl::ByAnyChar("\n\r"))) {
|
||||
if (!tokens.empty()) {
|
||||
// Keep line separators in the input std::string.
|
||||
// Keep line separators in the input string.
|
||||
tokens.push_back("\n");
|
||||
}
|
||||
for (auto token :
|
||||
|
@ -156,13 +156,13 @@ class FlagHelpPrettyPrinter {
|
|||
for (auto token : tokens) {
|
||||
bool new_line = (line_len_ == 0);
|
||||
|
||||
// Respect line separators in the input std::string.
|
||||
// Respect line separators in the input string.
|
||||
if (token == "\n") {
|
||||
EndLine();
|
||||
continue;
|
||||
}
|
||||
|
||||
// Write the token, ending the std::string first if necessary/possible.
|
||||
// Write the token, ending the string first if necessary/possible.
|
||||
if (!new_line && (line_len_ + token.size() >= max_line_len_)) {
|
||||
EndLine();
|
||||
new_line = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue