From: Arnaud Giersch Date: Wed, 2 Mar 2022 22:03:38 +0000 (+0100) Subject: Const methods. X-Git-Tag: v3.31~252 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4cf7a52375e761511d30a77a2977e5f3ac8a59f9 Const methods. --- diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index d43131a9fa..a08e5f76a7 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -119,7 +119,7 @@ public: * That's a buffer where the sent data will be copied */ CommPtr set_dst_data(void** buff, size_t size); /** Retrieve where the data will be copied on the receiver side */ - void* get_dst_data() { return dst_buff_; } + void* get_dst_data() const { return dst_buff_; } /** Retrieve the size of the received data. Not to be mixed with @ref Activity::set_remaining() */ size_t get_dst_data_size() const { return dst_buff_size_; } diff --git a/src/kernel/activity/CommImpl.hpp b/src/kernel/activity/CommImpl.hpp index 75b74c0eb9..ad9f4abedf 100644 --- a/src/kernel/activity/CommImpl.hpp +++ b/src/kernel/activity/CommImpl.hpp @@ -55,7 +55,7 @@ public: MailboxImpl* get_mailbox() const { return mbox_; } long get_mailbox_id() const { return mbox_id_; } bool detached() const { return detached_; } - bool is_assigned() { return (to_ != nullptr && from_ != nullptr); } + bool is_assigned() const { return (to_ != nullptr && from_ != nullptr); } std::vector get_traversed_links() const; void copy_data();