diff options
Diffstat (limited to 'src/components/config_profile/src/android_profile.cc')
-rw-r--r-- | src/components/config_profile/src/android_profile.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/components/config_profile/src/android_profile.cc b/src/components/config_profile/src/android_profile.cc index 6911592c83..b9cd826a64 100644 --- a/src/components/config_profile/src/android_profile.cc +++ b/src/components/config_profile/src/android_profile.cc @@ -35,30 +35,30 @@ namespace profile { -AndroidProfile::AndroidProfile(const std::string &internal_storage_dir, - const std::string &external_storage_dir) - : internal_storage_dir_(internal_storage_dir) - , external_storage_dir_(external_storage_dir) {} +AndroidProfile::AndroidProfile(const std::string& internal_storage_dir, + const std::string& external_storage_dir) + : internal_storage_dir_(internal_storage_dir) + , external_storage_dir_(external_storage_dir) {} -void AndroidProfile::SubstituteMacroInString(std::string &in_string) const { - std::string out_string = in_string; - const std::map<std::string, std::string> replace_macro = { - {"%ANDROID_INTERNAL_DIR%", internal_storage_dir_}, - {"%ANDROID_EXTERNAL_DIR%", external_storage_dir_} - }; +void AndroidProfile::SubstituteMacroInString(std::string& in_string) const { + std::string out_string = in_string; + const std::map<std::string, std::string> replace_macro = { + {"%ANDROID_INTERNAL_DIR%", internal_storage_dir_}, + {"%ANDROID_EXTERNAL_DIR%", external_storage_dir_}}; - for (const auto& macro : replace_macro) { - size_t index = 0; - while (true) { - index = out_string.find(macro.first, index); - if (index == std::string::npos) break; + for (const auto& macro : replace_macro) { + size_t index = 0; + while (true) { + index = out_string.find(macro.first, index); + if (index == std::string::npos) + break; - out_string.replace(index, macro.first.size(), macro.second); - index += macro.first.size(); - } + out_string.replace(index, macro.first.size(), macro.second); + index += macro.first.size(); } + } - in_string = out_string; + in_string = out_string; } -}
\ No newline at end of file +} // namespace profile
\ No newline at end of file |