diff --git a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h index 312fbe8..2dd733b 100644 --- a/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h +++ b/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h @@ -1370,6 +1370,8 @@ class ActionResultHolder : public UntypedActionResultHolderBase { template <> class ActionResultHolder : public UntypedActionResultHolderBase { public: + explicit ActionResultHolder() {} + void GetValueAndDelete() const { delete this; } virtual void PrintAsActionResult(::std::ostream* /* os */) const {} @@ -1381,7 +1383,7 @@ class ActionResultHolder : public UntypedActionResultHolderBase { const typename Function::ArgumentTuple& args, const string& call_description) { func_mocker->PerformDefaultAction(args, call_description); - return NULL; + return new ActionResultHolder(); } // Performs the given action and returns NULL. @@ -1390,7 +1392,7 @@ class ActionResultHolder : public UntypedActionResultHolderBase { const Action& action, const typename Function::ArgumentTuple& args) { action.Perform(args); - return NULL; + return new ActionResultHolder(); } };