summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Elements/StreamResume.h6
-rw-r--r--Swiften/Elements/StreamResumed.h6
-rw-r--r--Swiften/Parser/StreamResumeParser.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/Swiften/Elements/StreamResume.h b/Swiften/Elements/StreamResume.h
index 652182a..aec0909 100644
--- a/Swiften/Elements/StreamResume.h
+++ b/Swiften/Elements/StreamResume.h
@@ -25,16 +25,16 @@ namespace Swift {
return resumeID;
}
- const boost::optional<int> getHandledStanzasCount() const {
+ const boost::optional<unsigned int> getHandledStanzasCount() const {
return handledStanzasCount;
}
- void setHandledStanzasCount(int i) {
+ void setHandledStanzasCount(unsigned int i) {
handledStanzasCount = i;
}
private:
std::string resumeID;
- boost::optional<int> handledStanzasCount;
+ boost::optional<unsigned int> handledStanzasCount;
};
}
diff --git a/Swiften/Elements/StreamResumed.h b/Swiften/Elements/StreamResumed.h
index cc42895..cf9a755 100644
--- a/Swiften/Elements/StreamResumed.h
+++ b/Swiften/Elements/StreamResumed.h
@@ -25,16 +25,16 @@ namespace Swift {
return resumeID;
}
- const boost::optional<int> getHandledStanzasCount() const {
+ const boost::optional<unsigned int> getHandledStanzasCount() const {
return handledStanzasCount;
}
- void setHandledStanzasCount(int i) {
+ void setHandledStanzasCount(unsigned int i) {
handledStanzasCount = i;
}
private:
std::string resumeID;
- boost::optional<int> handledStanzasCount;
+ boost::optional<unsigned int> handledStanzasCount;
};
}
diff --git a/Swiften/Parser/StreamResumeParser.cpp b/Swiften/Parser/StreamResumeParser.cpp
index f54dcf0..cb1a61d 100644
--- a/Swiften/Parser/StreamResumeParser.cpp
+++ b/Swiften/Parser/StreamResumeParser.cpp
@@ -21,7 +21,7 @@ void StreamResumeParser::handleStartElement(const std::string&, const std::strin
boost::optional<std::string> handledStanzasCount = attributes.getAttributeValue("h");
if (handledStanzasCount) {
try {
- getElementGeneric()->setHandledStanzasCount(boost::lexical_cast<int>(*handledStanzasCount));
+ getElementGeneric()->setHandledStanzasCount(boost::lexical_cast<unsigned int>(*handledStanzasCount));
}
catch (const boost::bad_lexical_cast &) {
}