summaryrefslogtreecommitdiffstats
path: root/googlemock/include/gmock/gmock-cardinalities.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-10-25 02:04:43 (GMT)
committerGennadiy Civil <misterg@google.com>2018-10-26 18:19:59 (GMT)
commitb57c703963be1ca9749b902c49083beac56648aa (patch)
treeb7f5433fce3803d121c9963dc69bcdeec4d35f7c /googlemock/include/gmock/gmock-cardinalities.h
parenta50e4f05b3d84c6a014c59a24263328242cc8236 (diff)
downloadgoogletest-b57c703963be1ca9749b902c49083beac56648aa.zip
googletest-b57c703963be1ca9749b902c49083beac56648aa.tar.gz
googletest-b57c703963be1ca9749b902c49083beac56648aa.tar.bz2
Googletest export
Remove linked_ptr and use std::shared_ptr instead PiperOrigin-RevId: 218618184
Diffstat (limited to 'googlemock/include/gmock/gmock-cardinalities.h')
-rw-r--r--googlemock/include/gmock/gmock-cardinalities.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/googlemock/include/gmock/gmock-cardinalities.h b/googlemock/include/gmock/gmock-cardinalities.h
index 8fa25eb..f916931 100644
--- a/googlemock/include/gmock/gmock-cardinalities.h
+++ b/googlemock/include/gmock/gmock-cardinalities.h
@@ -40,7 +40,6 @@
#define GMOCK_INCLUDE_GMOCK_GMOCK_CARDINALITIES_H_
#include <limits.h>
-#include <memory>
#include <ostream> // NOLINT
#include "gmock/internal/gmock-port.h"
#include "gtest/gtest.h"
@@ -82,8 +81,9 @@ class CardinalityInterface {
// A Cardinality is a copyable and IMMUTABLE (except by assignment)
// object that specifies how many times a mock function is expected to
-// be called. The implementation of Cardinality is just a std::shared_ptr
-// to const CardinalityInterface. Don't inherit from Cardinality!
+// be called. The implementation of Cardinality is just a linked_ptr
+// to const CardinalityInterface, so copying is fairly cheap.
+// Don't inherit from Cardinality!
class GTEST_API_ Cardinality {
public:
// Constructs a null cardinality. Needed for storing Cardinality
@@ -123,7 +123,7 @@ class GTEST_API_ Cardinality {
::std::ostream* os);
private:
- std::shared_ptr<const CardinalityInterface> impl_;
+ internal::linked_ptr<const CardinalityInterface> impl_;
};
// Creates a cardinality that allows at least n calls.