You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a new ofxOscReceiver::message_buffer member variable. I suggest that it should be renamed "messageBuffer" in order to better match the overall OF API, however this is not a container (vector) but a single message, so maybe "buffer" doesn't quite make sense?
Also, should this be public? It looks like it is a storage object for calls to getMessage(). I suggest adding a comment about that this is for so we can know if we should use it or not, etc.
The text was updated successfully, but these errors were encountered:
Somewhat related: ofxOscMessage::getRemoteIp() is deprecated but it was added since the OF 0.12.0 release. Can we just remove it?
danomatika
changed the title
ofxOSC: consider renaming ofxOscReceiver::message_buffer, should it be private?
ofxOSC: consider renaming ofxOscReceiver::message_buffer, should it be private? remove ofxOscMessage::getRemoteIp()
Mar 31, 2025
the ofxOscReceiver::message_buffer should indeed be private; it's a scratch buffer to pass to the swap within the thread channel. maybe ofxOscReceiver::scratch_channel_message would be more precise? due to the working of thread channel a placeholder is required prior to the call, and the idea is not to constantly/needlessly reallocate an empty ofxOscMessage. I wonder now if the const is useful, and if and explicit std::move would be appropriate to ensure the optional alloc skips copies when possible? (maybe it already does?) the swap does not mind a moved-from state object as it's never used as such on the other side of the channel.
With
of_v20250330_osx_release
:There is a new
ofxOscReceiver::message_buffer
member variable. I suggest that it should be renamed "messageBuffer" in order to better match the overall OF API, however this is not a container (vector) but a single message, so maybe "buffer" doesn't quite make sense?Also, should this be public? It looks like it is a storage object for calls to
getMessage()
. I suggest adding a comment about that this is for so we can know if we should use it or not, etc.The text was updated successfully, but these errors were encountered: