mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -6,8 +6,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Concepts.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
@ -54,11 +54,11 @@ public:
|
|||
Function<ErrorOr<bool>(StringView)> accept_value;
|
||||
OptionHideMode hide_mode { OptionHideMode::None };
|
||||
|
||||
DeprecatedString name_for_display() const
|
||||
ByteString name_for_display() const
|
||||
{
|
||||
if (long_name)
|
||||
return DeprecatedString::formatted("--{}", long_name);
|
||||
return DeprecatedString::formatted("-{:c}", short_name);
|
||||
return ByteString::formatted("--{}", long_name);
|
||||
return ByteString::formatted("-{:c}", short_name);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
},
|
||||
.hide_mode = hide_mode });
|
||||
}
|
||||
void add_option(DeprecatedString& value, char const* help_string, char const* long_name, char short_name, char const* value_name, OptionHideMode hide_mode = OptionHideMode::None);
|
||||
void add_option(ByteString& value, char const* help_string, char const* long_name, char short_name, char const* value_name, OptionHideMode hide_mode = OptionHideMode::None);
|
||||
void add_option(String& value, char const* help_string, char const* long_name, char short_name, char const* value_name, OptionHideMode hide_mode = OptionHideMode::None);
|
||||
void add_option(StringView& value, char const* help_string, char const* long_name, char short_name, char const* value_name, OptionHideMode hide_mode = OptionHideMode::None);
|
||||
template<Integral I>
|
||||
|
@ -112,16 +112,16 @@ public:
|
|||
void add_option(Vector<size_t>& values, char const* help_string, char const* long_name, char short_name, char const* value_name, char separator = ',', OptionHideMode hide_mode = OptionHideMode::None);
|
||||
// Note: This option is being used when we expect the user to use the same option
|
||||
// multiple times (e.g. "program --option=example --option=anotherexample ...").
|
||||
void add_option(Vector<DeprecatedString>& values, char const* help_string, char const* long_name, char short_name, char const* value_name, OptionHideMode hide_mode = OptionHideMode::None);
|
||||
void add_option(Vector<ByteString>& values, char const* help_string, char const* long_name, char short_name, char const* value_name, OptionHideMode hide_mode = OptionHideMode::None);
|
||||
|
||||
void add_positional_argument(Arg&&);
|
||||
void add_positional_argument(DeprecatedString& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(ByteString& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(StringView& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(String& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
template<Integral I>
|
||||
void add_positional_argument(I& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(double& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(Vector<DeprecatedString>& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(Vector<ByteString>& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(Vector<StringView>& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
void add_positional_argument(Vector<String>& value, char const* help_string, char const* name, Required required = Required::Yes);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue