Skip to content

Behavior of message_t::copy is unclear #688

Description

@peterchen-cp

message_t::copy is declared as

void copy(message_t &msg_)

  • it is unclear which is the source and which is the destination.
    (looking into the documentation, this is the destination, and msg_ is the source.
  • as I understand, msg_ isn't const, because the underlying zmq_msg_copy may need to modify the source's reference count.

If these observations are correct, I would suggest to rename the parameter to

void copy(message_t &source)

(can provide pull request, but I'm not sure if I'm missing some detail...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions