summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Whiteboard/WhiteboardClient.cpp12
-rw-r--r--Swiften/Whiteboard/WhiteboardTransformer.cpp38
2 files changed, 25 insertions, 25 deletions
diff --git a/Swiften/Whiteboard/WhiteboardClient.cpp b/Swiften/Whiteboard/WhiteboardClient.cpp
index f8c677b..ce47fe5 100644
--- a/Swiften/Whiteboard/WhiteboardClient.cpp
+++ b/Swiften/Whiteboard/WhiteboardClient.cpp
@@ -15,15 +15,15 @@ namespace Swift {
WhiteboardOperation::ref op;
WhiteboardInsertOperation::ref insertOp = boost::dynamic_pointer_cast<WhiteboardInsertOperation>(operation);
if (insertOp) {
- op = boost::make_shared<WhiteboardInsertOperation>(*insertOp.get());
+ op = boost::make_shared<WhiteboardInsertOperation>(*insertOp);
}
WhiteboardUpdateOperation::ref updateOp = boost::dynamic_pointer_cast<WhiteboardUpdateOperation>(operation);
if (updateOp) {
- op = boost::make_shared<WhiteboardUpdateOperation>(*updateOp.get());
+ op = boost::make_shared<WhiteboardUpdateOperation>(*updateOp);
}
WhiteboardDeleteOperation::ref deleteOp = boost::dynamic_pointer_cast<WhiteboardDeleteOperation>(operation);
if (deleteOp) {
- op = boost::make_shared<WhiteboardDeleteOperation>(*deleteOp.get());
+ op = boost::make_shared<WhiteboardDeleteOperation>(*deleteOp);
}
if (bridge_.size() > 0) {
@@ -35,15 +35,15 @@ namespace Swift {
{
WhiteboardInsertOperation::ref insertOp = boost::dynamic_pointer_cast<WhiteboardInsertOperation>(operation);
if (insertOp) {
- op = boost::make_shared<WhiteboardInsertOperation>(*insertOp.get());
+ op = boost::make_shared<WhiteboardInsertOperation>(*insertOp);
}
WhiteboardUpdateOperation::ref updateOp = boost::dynamic_pointer_cast<WhiteboardUpdateOperation>(operation);
if (updateOp) {
- op = boost::make_shared<WhiteboardUpdateOperation>(*updateOp.get());
+ op = boost::make_shared<WhiteboardUpdateOperation>(*updateOp);
}
WhiteboardDeleteOperation::ref deleteOp = boost::dynamic_pointer_cast<WhiteboardDeleteOperation>(operation);
if (deleteOp) {
- op = boost::make_shared<WhiteboardDeleteOperation>(*deleteOp.get());
+ op = boost::make_shared<WhiteboardDeleteOperation>(*deleteOp);
}
diff --git a/Swiften/Whiteboard/WhiteboardTransformer.cpp b/Swiften/Whiteboard/WhiteboardTransformer.cpp
index 30450c1..8ee206b 100644
--- a/Swiften/Whiteboard/WhiteboardTransformer.cpp
+++ b/Swiften/Whiteboard/WhiteboardTransformer.cpp
@@ -40,25 +40,25 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardInsertOperation::ref clientOp, WhiteboardInsertOperation::ref serverOp) {
std::pair<WhiteboardInsertOperation::ref, WhiteboardInsertOperation::ref> result;
- result.first = boost::make_shared<WhiteboardInsertOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardInsertOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
result.first->setPos(result.first->getPos()+1);
- result.second = boost::make_shared<WhiteboardInsertOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardInsertOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
return result;
}
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardUpdateOperation::ref clientOp, WhiteboardUpdateOperation::ref serverOp) {
std::pair<WhiteboardUpdateOperation::ref, WhiteboardUpdateOperation::ref> result;
- result.first = boost::make_shared<WhiteboardUpdateOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardUpdateOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
if (clientOp->getPos() == serverOp->getPos()) {
- result.second = boost::make_shared<WhiteboardUpdateOperation>(*serverOp.get());
+ result.second = boost::make_shared<WhiteboardUpdateOperation>(*serverOp);
result.second->setID(clientOp->getID());
result.second->setParentID(serverOp->getID());
} else {
- result.second = boost::make_shared<WhiteboardUpdateOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardUpdateOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
}
return result;
@@ -66,9 +66,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardUpdateOperation::ref clientOp, WhiteboardInsertOperation::ref serverOp) {
std::pair<WhiteboardInsertOperation::ref, WhiteboardUpdateOperation::ref> result;
- result.first = boost::make_shared<WhiteboardInsertOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardInsertOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardUpdateOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardUpdateOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (serverOp->getPos() <= clientOp->getPos()) {
result.second->setPos(result.second->getPos()+1);
@@ -78,9 +78,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardInsertOperation::ref clientOp, WhiteboardUpdateOperation::ref serverOp) {
std::pair<WhiteboardUpdateOperation::ref, WhiteboardInsertOperation::ref> result;
- result.first = boost::make_shared<WhiteboardUpdateOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardUpdateOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardInsertOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardInsertOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (serverOp->getPos() >= clientOp->getPos()) {
result.first->setPos(result.first->getPos()+1);
@@ -90,9 +90,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardDeleteOperation::ref clientOp, WhiteboardDeleteOperation::ref serverOp) {
std::pair<WhiteboardDeleteOperation::ref, WhiteboardDeleteOperation::ref> result;
- result.first = boost::make_shared<WhiteboardDeleteOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardDeleteOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardDeleteOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardDeleteOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (clientOp->getPos() < serverOp->getPos()) {
result.first->setPos(result.first->getPos()-1);
@@ -105,9 +105,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardInsertOperation::ref clientOp, WhiteboardDeleteOperation::ref serverOp) {
std::pair<WhiteboardDeleteOperation::ref, WhiteboardInsertOperation::ref> result;
- result.first = boost::make_shared<WhiteboardDeleteOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardDeleteOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardInsertOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardInsertOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (clientOp->getPos() <= serverOp->getPos()) {
result.first->setPos(result.first->getPos()+1);
@@ -119,9 +119,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardDeleteOperation::ref clientOp, WhiteboardInsertOperation::ref serverOp) {
std::pair<WhiteboardInsertOperation::ref, WhiteboardDeleteOperation::ref> result;
- result.first = boost::make_shared<WhiteboardInsertOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardInsertOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardDeleteOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardDeleteOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (serverOp->getPos() <= clientOp->getPos()) {
result.second->setPos(result.second->getPos()+1);
@@ -133,9 +133,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardUpdateOperation::ref clientOp, WhiteboardDeleteOperation::ref serverOp) {
std::pair<WhiteboardDeleteOperation::ref, WhiteboardUpdateOperation::ref> result;
- result.first = boost::make_shared<WhiteboardDeleteOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardDeleteOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardUpdateOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardUpdateOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (clientOp->getPos() > serverOp->getPos()) {
result.second->setPos(result.second->getPos()-1);
@@ -146,9 +146,9 @@ namespace Swift {
std::pair<WhiteboardOperation::ref, WhiteboardOperation::ref> WhiteboardTransformer::transform(WhiteboardDeleteOperation::ref clientOp, WhiteboardUpdateOperation::ref serverOp) {
std::pair<WhiteboardUpdateOperation::ref, WhiteboardDeleteOperation::ref> result;
- result.first = boost::make_shared<WhiteboardUpdateOperation>(*serverOp.get());
+ result.first = boost::make_shared<WhiteboardUpdateOperation>(*serverOp);
result.first->setParentID(clientOp->getID());
- result.second = boost::make_shared<WhiteboardDeleteOperation>(*clientOp.get());
+ result.second = boost::make_shared<WhiteboardDeleteOperation>(*clientOp);
result.second->setParentID(serverOp->getID());
if (clientOp->getPos() < serverOp->getPos()) {
result.first->setPos(result.first->getPos()-1);