Skip to content

Commit

Permalink
Fix some const cast warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
biddisco committed May 9, 2017
1 parent 99fa6ef commit 2bf30de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/parcelport/libfabric/libfabric_controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ namespace libfabric
locality new_locality;
std::copy(binary_t(encoded_data),
binary_t(encoded_data + encoded_length),
(char*)(new_locality.fabric_data()));
(new_locality.fabric_data_writable()));

// insert locality into address vector
LOG_DEBUG_MSG("Calling insert_address for " << decnumber(i)
Expand Down
3 changes: 3 additions & 0 deletions plugins/parcelport/libfabric/locality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ struct locality {

const void *fabric_data() const { return data_.data(); }

char *fabric_data_writable() { return reinterpret_cast<char*>(data_.data()); }


bool valid() { return true; }

private:
Expand Down

0 comments on commit 2bf30de

Please sign in to comment.