summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/XMPPEvents')
-rw-r--r--Swift/Controllers/XMPPEvents/ErrorEvent.h8
-rw-r--r--Swift/Controllers/XMPPEvents/EventController.cpp5
-rw-r--r--Swift/Controllers/XMPPEvents/MessageEvent.h2
-rw-r--r--Swift/Controllers/XMPPEvents/StanzaEvent.h8
-rw-r--r--Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h12
5 files changed, 18 insertions, 17 deletions
diff --git a/Swift/Controllers/XMPPEvents/ErrorEvent.h b/Swift/Controllers/XMPPEvents/ErrorEvent.h
index cbfc471..ac09de9 100644
--- a/Swift/Controllers/XMPPEvents/ErrorEvent.h
+++ b/Swift/Controllers/XMPPEvents/ErrorEvent.h
@@ -18,10 +18,10 @@
namespace Swift {
class ErrorEvent : public StanzaEvent {
public:
- ErrorEvent(const JID& jid, const std::string& text) : jid_(jid), text_(text){};
- virtual ~ErrorEvent(){};
- const JID& getJID() const {return jid_;};
- const std::string& getText() const {return text_;};
+ ErrorEvent(const JID& jid, const std::string& text) : jid_(jid), text_(text){}
+ virtual ~ErrorEvent(){}
+ const JID& getJID() const {return jid_;}
+ const std::string& getText() const {return text_;}
private:
JID jid_;
diff --git a/Swift/Controllers/XMPPEvents/EventController.cpp b/Swift/Controllers/XMPPEvents/EventController.cpp
index d84dfe3..8cb259b 100644
--- a/Swift/Controllers/XMPPEvents/EventController.cpp
+++ b/Swift/Controllers/XMPPEvents/EventController.cpp
@@ -7,6 +7,7 @@
#include <Swift/Controllers/XMPPEvents/EventController.h>
#include <boost/bind.hpp>
+#include <boost/numeric/conversion/cast.hpp>
#include <algorithm>
#include <Swiften/Base/foreach.h>
@@ -48,7 +49,7 @@ void EventController::handleIncomingEvent(boost::shared_ptr<StanzaEvent> sourceE
if ((messageEvent && messageEvent->isReadable()) || subscriptionEvent || errorEvent || mucInviteEvent) {
events_.push_back(sourceEvent);
sourceEvent->onConclusion.connect(boost::bind(&EventController::handleEventConcluded, this, sourceEvent));
- onEventQueueLengthChange(events_.size());
+ onEventQueueLengthChange(boost::numeric_cast<int>(events_.size()));
onEventQueueEventAdded(sourceEvent);
if (sourceEvent->getConcluded()) {
handleEventConcluded(sourceEvent);
@@ -59,7 +60,7 @@ void EventController::handleIncomingEvent(boost::shared_ptr<StanzaEvent> sourceE
void EventController::handleEventConcluded(boost::shared_ptr<StanzaEvent> event) {
event->onConclusion.disconnect(boost::bind(&EventController::handleEventConcluded, this, event));
events_.erase(std::remove(events_.begin(), events_.end(), event), events_.end());
- onEventQueueLengthChange(events_.size());
+ onEventQueueLengthChange(boost::numeric_cast<int>(events_.size()));
}
void EventController::disconnectAll() {
diff --git a/Swift/Controllers/XMPPEvents/MessageEvent.h b/Swift/Controllers/XMPPEvents/MessageEvent.h
index 1093470..a9214f5 100644
--- a/Swift/Controllers/XMPPEvents/MessageEvent.h
+++ b/Swift/Controllers/XMPPEvents/MessageEvent.h
@@ -17,7 +17,7 @@ namespace Swift {
public:
typedef boost::shared_ptr<MessageEvent> ref;
- MessageEvent(boost::shared_ptr<Message> stanza) : stanza_(stanza), targetsMe_(true) {};
+ MessageEvent(boost::shared_ptr<Message> stanza) : stanza_(stanza), targetsMe_(true) {}
boost::shared_ptr<Message> getStanza() {return stanza_;}
diff --git a/Swift/Controllers/XMPPEvents/StanzaEvent.h b/Swift/Controllers/XMPPEvents/StanzaEvent.h
index 321d23d..a15afc1 100644
--- a/Swift/Controllers/XMPPEvents/StanzaEvent.h
+++ b/Swift/Controllers/XMPPEvents/StanzaEvent.h
@@ -14,13 +14,13 @@
namespace Swift {
class StanzaEvent {
public:
- StanzaEvent() : time_(boost::posix_time::microsec_clock::universal_time()) {concluded_ = false;};
- virtual ~StanzaEvent() {};
- void conclude() {concluded_ = true; onConclusion();};
+ StanzaEvent() : time_(boost::posix_time::microsec_clock::universal_time()) {concluded_ = false;}
+ virtual ~StanzaEvent() {}
+ void conclude() {concluded_ = true; onConclusion();}
/** Do not call this directly from outside the class.
* If you connect to this signal, you *must* disconnect from it manually. */
boost::signal<void()> onConclusion;
- bool getConcluded() {return concluded_;};
+ bool getConcluded() {return concluded_;}
boost::posix_time::ptime getTime() {return time_;}
private:
bool concluded_;
diff --git a/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h b/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h
index 1f7812e..fb7a05e 100644
--- a/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h
+++ b/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h
@@ -18,21 +18,21 @@
namespace Swift {
class SubscriptionRequestEvent : public StanzaEvent {
public:
- SubscriptionRequestEvent(const JID& jid, const std::string& reason) : jid_(jid), reason_(reason){};
- virtual ~SubscriptionRequestEvent(){};
- const JID& getJID() const {return jid_;};
- const std::string& getReason() const {return reason_;};
+ SubscriptionRequestEvent(const JID& jid, const std::string& reason) : jid_(jid), reason_(reason){}
+ virtual ~SubscriptionRequestEvent(){}
+ const JID& getJID() const {return jid_;}
+ const std::string& getReason() const {return reason_;}
boost::signal<void()> onAccept;
boost::signal<void()> onDecline;
void accept() {
onAccept();
conclude();
- };
+ }
void decline() {
onDecline();
conclude();
- };
+ }
void defer() {
conclude();