use size_t/ssize_t where appropriate

This commit is contained in:
john30
2017-03-04 13:15:30 +01:00
parent 7cebcb7fef
commit 1b4dfeb288
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -560,7 +560,7 @@ void MqttHandler::handleTraffic() {
} }
} }
string MqttHandler::getTopic(Message* message, signed char fieldIndex) { string MqttHandler::getTopic(Message* message, ssize_t fieldIndex) {
ostringstream ret; ostringstream ret;
for (size_t i = 0; i < m_topicStrs.size(); i++) { for (size_t i = 0; i < m_topicStrs.size(); i++) {
ret << m_topicStrs[i]; ret << m_topicStrs[i];
@@ -586,7 +586,7 @@ void MqttHandler::publishMessage(Message* message, ostringstream& updates) {
return; return;
} }
if (m_publishByField) { if (m_publishByField) {
signed char index = 0; ssize_t index = 0;
istringstream input(updates.str()); istringstream input(updates.str());
string token; string token;
while (getline(input, token, UI_FIELD_SEPARATOR)) { while (getline(input, token, UI_FIELD_SEPARATOR)) {
+1 -1
View File
@@ -98,7 +98,7 @@ class MqttHandler : public DataSink, public DataSource, public Thread {
* @param fieldIndex the optional field index for the field column, or -1. * @param fieldIndex the optional field index for the field column, or -1.
* @return the topic string. * @return the topic string.
*/ */
string getTopic(Message* message, signed char fieldIndex = -1); string getTopic(Message* message, ssize_t fieldIndex = -1);
/** /**
* Prepare a @a Message and publish as topic. * Prepare a @a Message and publish as topic.