summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-28 18:45:58 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-28 18:45:58 (GMT)
commit0709bd664af7a052f2fb7dae2b04e37afed8fdde (patch)
treea0e1112ffae15306c011ce6967d288d12d079e91 /SwifTools/Idle
parentee2baf882eab488342196a799fe9502bdd5c3c1d (diff)
downloadswift-0709bd664af7a052f2fb7dae2b04e37afed8fdde.zip
swift-0709bd664af7a052f2fb7dae2b04e37afed8fdde.tar.bz2
Change remaining std::auto_ptr usage to std::unique_ptr
Test-Information: Builds and tests pass on Ubuntu 16.04. Change-Id: If8da50619b0e029437b3b9d6b146f2ed49b5bf60
Diffstat (limited to 'SwifTools/Idle')
-rw-r--r--SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp b/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp
index 8e4177e..fa9b184 100644
--- a/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp
+++ b/SwifTools/Idle/UnitTest/ActualIdleDetectorTest.cpp
@@ -4,12 +4,13 @@
* See the COPYING file for more information.
*/
+#include <memory>
+
#include <boost/bind.hpp>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <Swiften/Base/foreach.h>
#include <Swiften/Network/Timer.h>
#include <Swiften/Network/TimerFactory.h>
@@ -51,7 +52,7 @@ class ActualIdleDetectorTest : public CppUnit::TestFixture {
}
void testHandleTick_Idle() {
- std::auto_ptr<ActualIdleDetector> testling(createDetector());
+ std::unique_ptr<ActualIdleDetector> testling(createDetector());
testling->setIdleTimeSeconds(15);
querier->idleTime = 15;
@@ -62,7 +63,7 @@ class ActualIdleDetectorTest : public CppUnit::TestFixture {
}
void testHandleTick_Idle_AlreadyIdle() {
- std::auto_ptr<ActualIdleDetector> testling(createDetector());
+ std::unique_ptr<ActualIdleDetector> testling(createDetector());
testling->setIdleTimeSeconds(15);
querier->idleTime = 15;
timerFactory->updateTime(15000);
@@ -75,7 +76,7 @@ class ActualIdleDetectorTest : public CppUnit::TestFixture {
}
void testHandleTick_NotIdle() {
- std::auto_ptr<ActualIdleDetector> testling(createDetector());
+ std::unique_ptr<ActualIdleDetector> testling(createDetector());
testling->setIdleTimeSeconds(15);
querier->idleTime = 15;
timerFactory->updateTime(15000);
@@ -89,7 +90,7 @@ class ActualIdleDetectorTest : public CppUnit::TestFixture {
}
void testHandleTick_NotIdle_AlreadyNotIdle() {
- std::auto_ptr<ActualIdleDetector> testling(createDetector());
+ std::unique_ptr<ActualIdleDetector> testling(createDetector());
testling->setIdleTimeSeconds(15);
querier->idleTime = 5;
@@ -150,7 +151,7 @@ class ActualIdleDetectorTest : public CppUnit::TestFixture {
MockTimerFactory() {}
void updateTime(int milliseconds) {
- foreach(std::shared_ptr<MockTimer> timer, timers) {
+ for (std::shared_ptr<MockTimer> timer : timers) {
timer->updateTime(milliseconds);
}
}