summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-param-util-generated.h.pump
diff options
context:
space:
mode:
authorGennadiy Civil <misterg@google.com>2018-01-10 19:42:29 (GMT)
committerGennadiy Civil <misterg@google.com>2018-01-10 19:42:29 (GMT)
commit6a26e47cfcc174cc85651cbde0b0158d03321e2f (patch)
tree81cb09cb7719f351ca000636dae760bef5be8511 /googletest/include/gtest/internal/gtest-param-util-generated.h.pump
parent62dbaa2947f7d058ea7e16703faea69b1134b024 (diff)
downloadgoogletest-6a26e47cfcc174cc85651cbde0b0158d03321e2f.zip
googletest-6a26e47cfcc174cc85651cbde0b0158d03321e2f.tar.gz
googletest-6a26e47cfcc174cc85651cbde0b0158d03321e2f.tar.bz2
Code merge, upstreaming accumulated changes, cleanup
Diffstat (limited to 'googletest/include/gtest/internal/gtest-param-util-generated.h.pump')
-rw-r--r--googletest/include/gtest/internal/gtest-param-util-generated.h.pump6
1 files changed, 3 insertions, 3 deletions
diff --git a/googletest/include/gtest/internal/gtest-param-util-generated.h.pump b/googletest/include/gtest/internal/gtest-param-util-generated.h.pump
index 7fcf4ce..d65086a 100644
--- a/googletest/include/gtest/internal/gtest-param-util-generated.h.pump
+++ b/googletest/include/gtest/internal/gtest-param-util-generated.h.pump
@@ -160,7 +160,7 @@ $for k [[
virtual ParamIteratorInterface<ParamType>* Clone() const {
return new Iterator(*this);
}
- virtual const ParamType* Current() const { return &current_value_; }
+ virtual const ParamType* Current() const { return current_value_.get(); }
virtual bool Equals(const ParamIteratorInterface<ParamType>& other) const {
// Having the same base generator guarantees that the other
// iterator is of the same type and we can downcast.
@@ -192,7 +192,7 @@ $for k [[
void ComputeCurrentValue() {
if (!AtEnd())
- current_value_ = ParamType($for j, [[*current$(j)_]]);
+ current_value_.reset(new ParamType($for j, [[*current$(j)_]]));
}
bool AtEnd() const {
// We must report iterator past the end of the range when either of the
@@ -217,7 +217,7 @@ $for j [[
typename ParamGenerator<T$j>::iterator current$(j)_;
]]
- ParamType current_value_;
+ linked_ptr<ParamType> current_value_;
}; // class CartesianProductGenerator$i::Iterator
// No implementation - assignment is unsupported.