From 05c0009046c6b8a668b38ed37e121db7d46dfd81 Mon Sep 17 00:00:00 2001 From: Yang Song Date: Wed, 1 Oct 2025 03:34:05 +0800 Subject: [PATCH] [routing-manager] make getter methods const (#11986) Make `RoutingManager::GetNextRdnssAddrEntry()` and `RoutingManager::GetNextIfAddrEntry()` const. These methods are simple getters that do not modify the state of `RoutingManager` and call const methods on `mRxRaTracker`. This change makes them consistent with other similar getter methods in RoutingManager like `GetNextPrefixTableEntry()` and `GetNextRouterEntry()`. --- src/core/border_router/routing_manager.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/border_router/routing_manager.hpp b/src/core/border_router/routing_manager.hpp index 75e7db52e..1f8fc52ab 100644 --- a/src/core/border_router/routing_manager.hpp +++ b/src/core/border_router/routing_manager.hpp @@ -536,7 +536,7 @@ public: * @retval kErrorNotFound No more entries in the table. * @retval kErrorInvalidArgs The @p aIterator is not valid (e.g. used to iterate over other entry types). */ - Error GetNextRdnssAddrEntry(PrefixTableIterator &aIterator, RdnssAddrEntry &aEntry) + Error GetNextRdnssAddrEntry(PrefixTableIterator &aIterator, RdnssAddrEntry &aEntry) const { return mRxRaTracker.GetNextRdnssAddr(aIterator, aEntry); } @@ -567,7 +567,7 @@ public: * @retval kErrorNotFound No more entries in the table. * @retval kErrorInvalidArgs The @p aIterator is not valid (e.g. used to iterate over other entry types). */ - Error GetNextIfAddrEntry(PrefixTableIterator &aIterator, IfAddrEntry &aEntry) + Error GetNextIfAddrEntry(PrefixTableIterator &aIterator, IfAddrEntry &aEntry) const { return mRxRaTracker.GetNextIfAddr(aIterator, aEntry); }