eclipse / paho.mqtt.cpp

Other
1.01k stars 432 forks source link

can't use get method in properties because of missing const #514

Open Ubiquite opened 2 weeks ago

Ubiquite commented 2 weeks ago

I can't use get method of class properties in message_arrived callback because it's not const but the parameter is mqtt::const_message_ptr. https://github.com/eclipse/paho.mqtt.cpp/blob/master/include/mqtt/properties.h#L387

Could you make is const ?

Because of that issue I used the c_struct to get the user property I needed, is there a better way ?

Thank you very much

fpagliughi commented 2 weeks ago

Oh, yes, you’re right. That should be const.