summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-04-01 17:23:49 (GMT)
committerTobias Markmann <tm@ayena.de>2016-04-04 08:28:23 (GMT)
commit741c45b74d5f634622eb5f757c49323274fb8937 (patch)
treeb9cfa6c2fe2e79e03cc8cb7c1ca1e9cf45aa5328 /Swiften/Elements/Whiteboard
parenteddd92ed76ae68cb1e202602fd3ebd11b69191a2 (diff)
downloadswift-741c45b74d5f634622eb5f757c49323274fb8937.zip
swift-741c45b74d5f634622eb5f757c49323274fb8937.tar.bz2
Modernize code to use C++11 shared_ptr instead of Boost's
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
Diffstat (limited to 'Swiften/Elements/Whiteboard')
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardElement.h5
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardLineElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardOperation.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h4
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardRectElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardTextElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h2
11 files changed, 14 insertions, 13 deletions
diff --git a/Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h b/Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h
index afecd0c..ae0fe17 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardDeleteOperation.h
@@ -19,7 +19,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardDeleteOperation : public WhiteboardOperation {
public:
- typedef boost::shared_ptr<WhiteboardDeleteOperation> ref;
+ typedef std::shared_ptr<WhiteboardDeleteOperation> ref;
public:
std::string getElementID() const {
return elementID_;
diff --git a/Swiften/Elements/Whiteboard/WhiteboardElement.h b/Swiften/Elements/Whiteboard/WhiteboardElement.h
index a4d1207..6f6ff4f 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardElement.h
@@ -12,14 +12,15 @@
#pragma once
-#include <boost/shared_ptr.hpp>
+#include <memory>
+#include <string>
#include <Swiften/Elements/Whiteboard/WhiteboardElementVisitor.h>
namespace Swift {
class WhiteboardElement {
public:
- typedef boost::shared_ptr<WhiteboardElement> ref;
+ typedef std::shared_ptr<WhiteboardElement> ref;
public:
virtual ~WhiteboardElement() {}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h b/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h
index 15b50e4..7d80bf7 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h
@@ -19,7 +19,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardEllipseElement : public WhiteboardElement {
public:
- typedef boost::shared_ptr<WhiteboardEllipseElement> ref;
+ typedef std::shared_ptr<WhiteboardEllipseElement> ref;
public:
WhiteboardEllipseElement(int cx, int cy, int rx, int ry) {
cx_ = cx;
diff --git a/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h b/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h
index 7522b7b..b8b7e54 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h
@@ -23,7 +23,7 @@ namespace Swift {
class SWIFTEN_API WhiteboardFreehandPathElement : public WhiteboardElement {
typedef std::pair<int, int> Point;
public:
- typedef boost::shared_ptr<WhiteboardFreehandPathElement> ref;
+ typedef std::shared_ptr<WhiteboardFreehandPathElement> ref;
public:
WhiteboardFreehandPathElement() {
}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h b/Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h
index 855e502..256c17e 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardInsertOperation.h
@@ -19,7 +19,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardInsertOperation : public WhiteboardOperation {
public:
- typedef boost::shared_ptr<WhiteboardInsertOperation> ref;
+ typedef std::shared_ptr<WhiteboardInsertOperation> ref;
public:
WhiteboardElement::ref getElement() const {
return element_;
diff --git a/Swiften/Elements/Whiteboard/WhiteboardLineElement.h b/Swiften/Elements/Whiteboard/WhiteboardLineElement.h
index 7fb8a77..9c64977 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardLineElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardLineElement.h
@@ -20,7 +20,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardLineElement : public WhiteboardElement {
public:
- typedef boost::shared_ptr<WhiteboardLineElement> ref;
+ typedef std::shared_ptr<WhiteboardLineElement> ref;
public:
WhiteboardLineElement(int x1, int y1, int x2, int y2) : penWidth_(1) {
x1_ = x1;
diff --git a/Swiften/Elements/Whiteboard/WhiteboardOperation.h b/Swiften/Elements/Whiteboard/WhiteboardOperation.h
index b657bd9..7d48e4d 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardOperation.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardOperation.h
@@ -21,7 +21,7 @@
namespace Swift {
class WhiteboardOperation {
public:
- typedef boost::shared_ptr<WhiteboardOperation> ref;
+ typedef std::shared_ptr<WhiteboardOperation> ref;
public:
WhiteboardOperation() {}
SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(WhiteboardOperation)
diff --git a/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h b/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h
index bd0b674..b8591cf 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -22,7 +22,7 @@ namespace Swift {
class SWIFTEN_API WhiteboardPolygonElement : public WhiteboardElement {
typedef std::pair<int, int> Point;
public:
- typedef boost::shared_ptr<WhiteboardPolygonElement> ref;
+ typedef std::shared_ptr<WhiteboardPolygonElement> ref;
public:
WhiteboardPolygonElement() {
}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardRectElement.h b/Swiften/Elements/Whiteboard/WhiteboardRectElement.h
index c681e97..4dcdc8a 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardRectElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardRectElement.h
@@ -19,7 +19,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardRectElement : public WhiteboardElement {
public:
- typedef boost::shared_ptr<WhiteboardRectElement> ref;
+ typedef std::shared_ptr<WhiteboardRectElement> ref;
public:
WhiteboardRectElement(int x, int y, int width, int height) : penWidth_(1) {
x_ = x;
diff --git a/Swiften/Elements/Whiteboard/WhiteboardTextElement.h b/Swiften/Elements/Whiteboard/WhiteboardTextElement.h
index df00bea..41f31f6 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardTextElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardTextElement.h
@@ -19,7 +19,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardTextElement : public WhiteboardElement {
public:
- typedef boost::shared_ptr<WhiteboardTextElement> ref;
+ typedef std::shared_ptr<WhiteboardTextElement> ref;
public:
WhiteboardTextElement(int x, int y) {
x_ = x;
diff --git a/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h b/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h
index 5147999..b6dfd4f 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h
@@ -19,7 +19,7 @@
namespace Swift {
class SWIFTEN_API WhiteboardUpdateOperation : public WhiteboardOperation {
public:
- typedef boost::shared_ptr<WhiteboardUpdateOperation> ref;
+ typedef std::shared_ptr<WhiteboardUpdateOperation> ref;
public:
WhiteboardElement::ref getElement() const {
return element_;