diff options
author | b.siddharth <b.siddharth@samsung.com> | 2015-04-30 01:04:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-30 08:05:08 +0000 |
commit | 2cfa7f9a3496959dcf3785514d1f8fc89d471fb4 (patch) | |
tree | 93c2ceba34575d2fe9af6bd457f819f2f83bdc9d | |
parent | 66c786a59403f02dc49df0090cece8e0e3cc3b1b (diff) | |
download | chromium_src-2cfa7f9a3496959dcf3785514d1f8fc89d471fb4.zip chromium_src-2cfa7f9a3496959dcf3785514d1f8fc89d471fb4.tar.gz chromium_src-2cfa7f9a3496959dcf3785514d1f8fc89d471fb4.tar.bz2 |
Replace const by value return values to const by ref in net/socket/tcp_listen_socket_unittest.h
This CL turns const by value return values into const by ref
Replacing const value by a const ref when a member variable is safe, because
the member variable will live at least as long as the temporary object returned
now. It can also be more efficient, because returning a ref can spare copying.
BUG=393155
Review URL: https://codereview.chromium.org/1107943002
Cr-Commit-Position: refs/heads/master@{#327680}
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | net/socket/tcp_listen_socket_unittest.h | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -584,6 +584,7 @@ Kenneth Strickland <ken.strickland@gmail.com> Olli Syrjälä <olli.syrjala@intel.com> Vishal Bhatnagar <vishal.b@samsung.com> Yunsik Jang <yunsik.jang@lge.com> +Siddharth Bagai <b.siddharth@samsung.com> BlackBerry Limited <*@blackberry.com> Code Aurora Forum <*@codeaurora.org> diff --git a/net/socket/tcp_listen_socket_unittest.h b/net/socket/tcp_listen_socket_unittest.h index 984442a..cd19a1c 100644 --- a/net/socket/tcp_listen_socket_unittest.h +++ b/net/socket/tcp_listen_socket_unittest.h @@ -48,7 +48,7 @@ class TCPListenSocketTestAction { : action_(action), data_(data) {} - const std::string data() const { return data_; } + const std::string& data() const { return data_; } ActionType type() const { return action_; } private: |