diff options
author | Povilas Kanapickas <povilas@radix.lt> | 2020-11-13 04:50:39 +0200 |
---|---|---|
committer | Povilas Kanapickas <povilas@radix.lt> | 2020-11-20 04:38:33 +0200 |
commit | dbf151fe2c30257020ac52758f34bb6151a3b7da (patch) | |
tree | 1ccd91b9b6d5468366e623ba456b59aca8d3f152 | |
parent | 0dadb4b8a5ed33660bce498f130de8f15eabd001 (diff) |
Replace deprecated std::auto_ptr with std::unique_ptr
-rw-r--r-- | include/xorg/gtest/evemu/xorg-gtest-device.h | 2 | ||||
-rw-r--r-- | include/xorg/gtest/xorg-gtest-environment.h | 2 | ||||
-rw-r--r-- | include/xorg/gtest/xorg-gtest-process.h | 4 | ||||
-rw-r--r-- | include/xorg/gtest/xorg-gtest-test.h | 2 | ||||
-rw-r--r-- | include/xorg/gtest/xorg-gtest-xserver.h | 2 | ||||
-rw-r--r-- | src/process.cpp | 2 |
6 files changed, 9 insertions, 5 deletions
diff --git a/include/xorg/gtest/evemu/xorg-gtest-device.h b/include/xorg/gtest/evemu/xorg-gtest-device.h index 61a9c01..e722058 100644 --- a/include/xorg/gtest/evemu/xorg-gtest-device.h +++ b/include/xorg/gtest/evemu/xorg-gtest-device.h @@ -129,7 +129,7 @@ class Device { private: struct Private; - std::auto_ptr<Private> d_; + std::unique_ptr<Private> d_; /* Disable copy constructor & assignment operator */ Device(const Device&); diff --git a/include/xorg/gtest/xorg-gtest-environment.h b/include/xorg/gtest/xorg-gtest-environment.h index b2c2be7..33162c9 100644 --- a/include/xorg/gtest/xorg-gtest-environment.h +++ b/include/xorg/gtest/xorg-gtest-environment.h @@ -221,7 +221,7 @@ class Environment : public ::testing::Environment { private: struct Private; - std::auto_ptr<Private> d_; + std::unique_ptr<Private> d_; /* Disable copy constructor & assignment operator */ Environment(const Environment&); diff --git a/include/xorg/gtest/xorg-gtest-process.h b/include/xorg/gtest/xorg-gtest-process.h index 30fe30b..2c4c897 100644 --- a/include/xorg/gtest/xorg-gtest-process.h +++ b/include/xorg/gtest/xorg-gtest-process.h @@ -111,6 +111,8 @@ class Process { */ Process(); + ~Process(); + /** * Fork manually. Usually, fork() is called as part of Start() but for * use-cases where the parent process and the child process need special @@ -238,7 +240,7 @@ class Process { private: struct Private; - std::auto_ptr<Private> d_; + std::unique_ptr<Private> d_; /* Disable copy constructor, assignment operator */ Process(const Process&); diff --git a/include/xorg/gtest/xorg-gtest-test.h b/include/xorg/gtest/xorg-gtest-test.h index 133f21b..eb8834d 100644 --- a/include/xorg/gtest/xorg-gtest-test.h +++ b/include/xorg/gtest/xorg-gtest-test.h @@ -101,7 +101,7 @@ class Test : public ::testing::Test { /** @cond Implementation */ struct Private; - std::auto_ptr<Private> d_; + std::unique_ptr<Private> d_; /** @endcond Implementation */ private: /* Disable copy c'tor, assignment operator */ diff --git a/include/xorg/gtest/xorg-gtest-xserver.h b/include/xorg/gtest/xorg-gtest-xserver.h index efe46e1..03aeca4 100644 --- a/include/xorg/gtest/xorg-gtest-xserver.h +++ b/include/xorg/gtest/xorg-gtest-xserver.h @@ -280,7 +280,7 @@ class XServer : public xorg::testing::Process { private: struct Private; - std::auto_ptr<Private> d_; + std::unique_ptr<Private> d_; /* Disable copy constructor, assignment operator */ XServer(const XServer&); diff --git a/src/process.cpp b/src/process.cpp index 35831d7..dac820b 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -51,6 +51,8 @@ xorg::testing::Process::Process() : d_(new Private) { d_->state = NONE; } +xorg::testing::Process::~Process() {} + enum xorg::testing::Process::State xorg::testing::Process::GetState() { if (d_->state == RUNNING) { int status; |