summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@ubuntu.com>2011-12-08 14:20:53 -0800
committerChase Douglas <chase.douglas@ubuntu.com>2011-12-08 14:20:53 -0800
commit3eda6c1380ab4bdfaf891d6d20097dc83dac8e65 (patch)
treecd55651027fc1b040885f56ebba3999c5603c9ba
parent826c9bbf23fd5650cd2ca0e3314e4e8559b1061e (diff)
Use std::auto_ptr for Test pimpl too
-rw-r--r--include/xorg/gtest/test.h5
-rw-r--r--src/test.cpp4
2 files changed, 3 insertions, 6 deletions
diff --git a/include/xorg/gtest/test.h b/include/xorg/gtest/test.h
index 0890cbf..e27a947 100644
--- a/include/xorg/gtest/test.h
+++ b/include/xorg/gtest/test.h
@@ -22,6 +22,8 @@
#ifndef XORG_GTEST_TEST_H_
#define XORG_GTEST_TEST_H_
+#include <memory>
+
#include <gtest/gtest.h>
#include <X11/Xlib.h>
@@ -33,7 +35,6 @@ namespace testing {
class Test : public ::testing::Test {
public:
Test();
- virtual ~Test();
virtual void SetUp();
virtual void TearDown();
@@ -42,7 +43,7 @@ class Test : public ::testing::Test {
::Display* Display() const;
struct Private;
- Private* d_;
+ std::auto_ptr<Private> d_;
private:
/* Disable copy c'tor, assignment operator */
diff --git a/src/test.cpp b/src/test.cpp
index 0ae31cf..565c321 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -44,7 +44,3 @@ void xorg::testing::Test::TearDown() {
::Display* xorg::testing::Test::Display() const {
return d_->display;
}
-
-xorg::testing::Test::~Test() {
- delete d_;
-}