1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:57:35 +00:00

Everywhere: Add sv suffix to strings relying on StringView(char const*)

Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
This commit is contained in:
sin-ack 2022-07-11 17:32:29 +00:00 committed by Andreas Kling
parent e5f09ea170
commit 3f3f45580a
762 changed files with 8315 additions and 8316 deletions

View file

@ -68,27 +68,27 @@ public:
{
StringBuilder cert_name;
if (!subject.country.is_empty()) {
cert_name.append("/C=");
cert_name.append("/C="sv);
cert_name.append(subject.country);
}
if (!subject.state.is_empty()) {
cert_name.append("/ST=");
cert_name.append("/ST="sv);
cert_name.append(subject.state);
}
if (!subject.location.is_empty()) {
cert_name.append("/L=");
cert_name.append("/L="sv);
cert_name.append(subject.location);
}
if (!subject.entity.is_empty()) {
cert_name.append("/O=");
cert_name.append("/O="sv);
cert_name.append(subject.entity);
}
if (!subject.unit.is_empty()) {
cert_name.append("/OU=");
cert_name.append("/OU="sv);
cert_name.append(subject.unit);
}
if (!subject.subject.is_empty()) {
cert_name.append("/CN=");
cert_name.append("/CN="sv);
cert_name.append(subject.subject);
}
return cert_name.build();
@ -98,27 +98,27 @@ public:
{
StringBuilder cert_name;
if (!issuer.country.is_empty()) {
cert_name.append("/C=");
cert_name.append("/C="sv);
cert_name.append(issuer.country);
}
if (!issuer.state.is_empty()) {
cert_name.append("/ST=");
cert_name.append("/ST="sv);
cert_name.append(issuer.state);
}
if (!issuer.location.is_empty()) {
cert_name.append("/L=");
cert_name.append("/L="sv);
cert_name.append(issuer.location);
}
if (!issuer.entity.is_empty()) {
cert_name.append("/O=");
cert_name.append("/O="sv);
cert_name.append(issuer.entity);
}
if (!issuer.unit.is_empty()) {
cert_name.append("/OU=");
cert_name.append("/OU="sv);
cert_name.append(issuer.unit);
}
if (!issuer.subject.is_empty()) {
cert_name.append("/CN=");
cert_name.append("/CN="sv);
cert_name.append(issuer.subject);
}
return cert_name.build();