Fix non-compliant rvalue ref code in chrome\updater\tag_unittest.cc.
This CL fixes a minor coding style issue. https://google.github.io/styleguide/cppguide.html#Rvalue_references According to the coding style, rvalue refs can only be used in a couple of scenarios, and they do not include returning rvalue references, or passing by rvalue reference, except in a specific case. This CL also fixes a couple of places where const pass by value was used instead of pass by ref to const. Since the initial intention of the code was to use move semantics, that intention has been preserved, especially to allow move semantics here: TagArgsBuilder& WithApp(AppArgs app) { this->inner_.apps.push_back(std::move(app)); return *this; } Due to how the code is used later on, move semantics for the TagArgsBuilder is not really needed but the implementation was retained to make TagArgsBuilder and AppArgsBuilder similar. The CL code is slightly less efficient than the original code but efficiency is not a first order concern in this module. Bug: 1164718 Change-Id: I8b7ff4d225728b1ed00b0b387649672f5553c3f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2620401Reviewed-by:Joshua Pawlicki <waffles@chromium.org> Commit-Queue: Sorin Jianu <sorin@chromium.org> Cr-Commit-Position: refs/heads/master@{#842080}
Showing
Please register or sign in to comment