aboutsummaryrefslogtreecommitdiffstats
path: root/include/gmock/gmock-spec-builders.h
diff options
context:
space:
mode:
authorkosak <kosak@google.com>2014-11-17 00:56:52 +0000
committerkosak <kosak@google.com>2014-11-17 00:56:52 +0000
commit3d1c78b2bff05a794b037b99766640f8f2b19855 (patch)
tree765defbcd845a423820fec748cbb48ed51ccc425 /include/gmock/gmock-spec-builders.h
parent5b9cbbb16d774bfcb51572d52eda3f7319088e23 (diff)
downloadgoogletest-3d1c78b2bff05a794b037b99766640f8f2b19855.tar.gz
googletest-3d1c78b2bff05a794b037b99766640f8f2b19855.tar.bz2
googletest-3d1c78b2bff05a794b037b99766640f8f2b19855.zip
Add ByMove() modifier for the Return() action. Pull in gtest 695.
Diffstat (limited to 'include/gmock/gmock-spec-builders.h')
-rw-r--r--include/gmock/gmock-spec-builders.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/gmock/gmock-spec-builders.h b/include/gmock/gmock-spec-builders.h
index 63655b91..61e140e4 100644
--- a/include/gmock/gmock-spec-builders.h
+++ b/include/gmock/gmock-spec-builders.h
@@ -1302,15 +1302,12 @@ template <typename T>
class ReferenceOrValueWrapper {
public:
// Constructs a wrapper from the given value/reference.
- explicit ReferenceOrValueWrapper(T value)
- : value_(GTEST_MOVE_(value)) {}
+ explicit ReferenceOrValueWrapper(T value) : value_(move(value)) {}
// Unwraps and returns the underlying value/reference, exactly as
// originally passed. The behavior of calling this more than once on
// the same object is unspecified.
- T Unwrap() {
- return GTEST_MOVE_(value_);
- }
+ T Unwrap() { return move(value_); }
// Provides nondestructive access to the underlying value/reference.
// Always returns a const reference (more precisely,
@@ -1407,8 +1404,7 @@ class ActionResultHolder : public UntypedActionResultHolderBase {
private:
typedef ReferenceOrValueWrapper<T> Wrapper;
- explicit ActionResultHolder(Wrapper result)
- : result_(GTEST_MOVE_(result)) {}
+ explicit ActionResultHolder(Wrapper result) : result_(move(result)) {}
Wrapper result_;