refactor: remove unused PIBinaryStream operators for PIMQTT message types
The operator<< / operator>> templates for MessageConst / MessageMutable
added in 4d8b7430 have no users in the tree (libs, tests, utils, main).
Drop them along with the pibinarystream.h include they required; the
binary-stream fallback static_assert in pibinarystream.h already gives a
clear compile error if external code ever streams an MQTT message.
This commit is contained in:
@@ -25,7 +25,6 @@
|
||||
#ifndef pimqtttypes_h
|
||||
#define pimqtttypes_h
|
||||
|
||||
#include "pibinarystream.h"
|
||||
#include "pip_export.h"
|
||||
#include "pistringlist.h"
|
||||
|
||||
@@ -160,26 +159,6 @@ public:
|
||||
//! \~russian Возвращает ID сообщения.
|
||||
MessageMutable & setID(int id);
|
||||
};
|
||||
template<typename P>
|
||||
inline PIBinaryStream<P> & operator<<(PIBinaryStream<P> & s, const MessageConst & v) {
|
||||
s << v.topic() << v.pathArguments() << v.payload() << v.properties() << static_cast<int>(v.qos()) << v.ID() << v.isDuplicate();
|
||||
return s;
|
||||
}
|
||||
|
||||
template<typename P>
|
||||
inline PIBinaryStream<P> & operator>>(PIBinaryStream<P> & s, MessageMutable & v) {
|
||||
PIString topic;
|
||||
PIMap<PIString, PIString> path_args;
|
||||
PIByteArray payload;
|
||||
PIMap<int, PIString> props;
|
||||
int qos_val, msg_id;
|
||||
bool is_dup;
|
||||
s >> topic >> path_args >> payload >> props >> qos_val >> msg_id >> is_dup;
|
||||
v.setTopic(topic).setPayload(payload).setQos(static_cast<QoS>(qos_val)).setID(msg_id).setDuplicate(is_dup);
|
||||
v.pathArguments() = path_args;
|
||||
v.properties() = props;
|
||||
return s;
|
||||
}
|
||||
|
||||
}; // namespace PIMQTT
|
||||
|
||||
|
||||
Reference in New Issue
Block a user