[Cleanup] Un-const the result of base::Version::GetString()
base::Version::GetString() returned a `const std::string`; there's no reason to do this, since it's a new string (and not a reference to a member). Additionally, this could potentially result in invocations of Version::GetString() creating a copy, if the caller did something like: std::string version_string = version.GetString(); Since the result would be a `const std::string`, a copy might be made to fit into the non-const std::string required by the caller. Hopefully, the compiler is smart enough to optimize this out, but it's better to just un-const the result altogether. Bug: None Change-Id: I5afb69b5e1e04dab03eb8629ea7e2d124e91f755 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1825460Reviewed-by:Albert J. Wong <ajwong@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#699982}
Showing
Please register or sign in to comment