commit | fde745d058a8a50019c01c838a7efa5be2f6268c | [log] [tgz] |
---|---|---|
author | Devlin Cronin <rdevlin.cronin@chromium.org> | Wed Sep 25 22:21:57 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Sep 25 22:21:57 2019 |
tree | e60a6f49bc921ab3342f63542f6d66d52c97aff3 | |
parent | 75a39ca7ac8dcfc6a830db07a5a389ca9ab27b1d [diff] |
[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/+/1825460 Reviewed-by: Albert J. Wong <ajwong@chromium.org> Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Cr-Commit-Position: refs/heads/master@{#699982}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .