use size_t/ssize_t where appropriate
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user