@@ -386,40 +386,6 @@ class IntraProcessManager
386386 std::vector<uint64_t > take_ownership_subscriptions;
387387 };
388388
389- // / Hash function for rmw_gid_t to enable use in unordered_map
390- struct rmw_gid_hash
391- {
392- std::size_t operator ()(const rmw_gid_t & gid) const noexcept
393- {
394- // Using the FNV-1a hash algorithm on the gid data
395- constexpr std::size_t FNV_prime = 1099511628211u ;
396- std::size_t result = 14695981039346656037u ;
397-
398- for (std::size_t i = 0 ; i < RMW_GID_STORAGE_SIZE; ++i) {
399- result ^= gid.data [i];
400- result *= FNV_prime;
401- }
402- return result;
403- }
404- };
405-
406- // / Equality comparison for rmw_gid_t to enable use in unordered_map
407- struct rmw_gid_equal
408- {
409- bool operator ()(const rmw_gid_t & lhs, const rmw_gid_t & rhs) const noexcept
410- {
411- // Compare implementation identifier first for fast rejection
412- if (lhs.implementation_identifier != rhs.implementation_identifier ) {
413- return false ;
414- }
415- // Compare the data bytes
416- return std::equal (
417- std::begin (lhs.data ),
418- std::end (lhs.data ),
419- std::begin (rhs.data ));
420- }
421- };
422-
423389 using SubscriptionMap =
424390 std::unordered_map<uint64_t , rclcpp::experimental::SubscriptionIntraProcessBase::WeakPtr>;
425391
@@ -432,16 +398,6 @@ class IntraProcessManager
432398 using PublisherToSubscriptionIdsMap =
433399 std::unordered_map<uint64_t , SplittedSubscriptions>;
434400
435- // / Structure to store publisher information in GID lookup map
436- struct PublisherInfo
437- {
438- uint64_t pub_id;
439- rclcpp::PublisherBase::WeakPtr publisher;
440- };
441-
442- using GidToPublisherInfoMap =
443- std::unordered_map<rmw_gid_t , PublisherInfo, rmw_gid_hash, rmw_gid_equal>;
444-
445401 RCLCPP_PUBLIC
446402 static
447403 uint64_t
@@ -684,7 +640,6 @@ class IntraProcessManager
684640 SubscriptionMap subscriptions_;
685641 PublisherMap publishers_;
686642 PublisherBufferMap publisher_buffers_;
687- GidToPublisherInfoMap gid_to_publisher_info_;
688643
689644 mutable std::shared_timed_mutex mutex_;
690645};
0 commit comments