summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-06-12 09:30:37 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-06-14 10:14:50 +0000
commit2b4eb676348f122ab0a21e19d7a3c57bd9898c6c (patch)
tree281ceaa54365c8c38ca94ea484c831aeb1951bf8 /cmdline
parent9132d9056cc1d4eb342d1a2b0315fc1f054ca2f8 (diff)
Use C++20 `string{,_view}::{starts,ends}_with()`, part 2.
Replace uses of `android::base::{Starts,Ends}With()`. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: I80a0ca93f433464270989d248dd999e9366a1c17
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/cmdline_types.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmdline/cmdline_types.h b/cmdline/cmdline_types.h
index 34c1b0fc97..4a33fb8b55 100644
--- a/cmdline/cmdline_types.h
+++ b/cmdline/cmdline_types.h
@@ -813,58 +813,58 @@ struct CmdlineType<ProfileSaverOptions> : CmdlineTypeParser<ProfileSaverOptions>
// The rest of these options are always the wildcard from '-Xps-*'
std::string suffix = RemovePrefix(option);
- if (android::base::StartsWith(option, "min-save-period-ms:")) {
+ if (option.starts_with("min-save-period-ms:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::min_save_period_ms_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "min-first-save-ms:")) {
+ if (option.starts_with("min-first-save-ms:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::min_first_save_ms_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "save-resolved-classes-delay-ms:")) {
+ if (option.starts_with("save-resolved-classes-delay-ms:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::save_resolved_classes_delay_ms_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "hot-startup-method-samples:")) {
+ if (option.starts_with("hot-startup-method-samples:")) {
LOG(WARNING) << "-Xps-hot-startup-method-samples option is deprecated";
return Result::SuccessNoValue();
}
- if (android::base::StartsWith(option, "min-methods-to-save:")) {
+ if (option.starts_with("min-methods-to-save:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::min_methods_to_save_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "min-classes-to-save:")) {
+ if (option.starts_with("min-classes-to-save:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::min_classes_to_save_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "min-notification-before-wake:")) {
+ if (option.starts_with("min-notification-before-wake:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::min_notification_before_wake_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "max-notification-before-wake:")) {
+ if (option.starts_with("max-notification-before-wake:")) {
CmdlineType<unsigned int> type_parser;
return ParseInto(existing,
&ProfileSaverOptions::max_notification_before_wake_,
type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "inline-cache-threshold:")) {
+ if (option.starts_with("inline-cache-threshold:")) {
CmdlineType<uint16_t> type_parser;
return ParseInto(
existing, &ProfileSaverOptions::inline_cache_threshold_, type_parser.Parse(suffix));
}
- if (android::base::StartsWith(option, "profile-path:")) {
+ if (option.starts_with("profile-path:")) {
existing.profile_path_ = suffix;
return Result::SuccessNoValue();
}