@@ -1735,15 +1735,6 @@ namespace MDNSImplementation
1735
1735
const MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcIP4Address*
1736
1736
MDNSResponder::stcMDNSServiceQuery::stcAnswer::findIP4Address (
1737
1737
const IPAddress& p_IPAddress) const
1738
- {
1739
- return (stcIP4Address*)(((const stcAnswer*)this )->findIP4Address (p_IPAddress));
1740
- }
1741
-
1742
- /*
1743
- MDNSResponder::stcMDNSServiceQuery::stcAnswer::findIP4Address
1744
- */
1745
- MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcIP4Address*
1746
- MDNSResponder::stcMDNSServiceQuery::stcAnswer::findIP4Address (const IPAddress& p_IPAddress)
1747
1738
{
1748
1739
stcIP4Address* pIP4Address = m_pIP4Addresses;
1749
1740
while (pIP4Address)
@@ -1757,6 +1748,16 @@ namespace MDNSImplementation
1757
1748
return pIP4Address;
1758
1749
}
1759
1750
1751
+ /*
1752
+ MDNSResponder::stcMDNSServiceQuery::stcAnswer::findIP4Address
1753
+ */
1754
+ MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcIP4Address*
1755
+ MDNSResponder::stcMDNSServiceQuery::stcAnswer::findIP4Address (const IPAddress& p_IPAddress)
1756
+ {
1757
+ const auto & cref = static_cast <const decltype (*this )>(*this );
1758
+ return const_cast <stcIP4Address*>(cref.findIP4Address (p_IPAddress));
1759
+ }
1760
+
1760
1761
/*
1761
1762
MDNSResponder::stcMDNSServiceQuery::stcAnswer::IP4AddressCount
1762
1763
*/
@@ -2033,7 +2034,8 @@ namespace MDNSImplementation
2033
2034
MDNSResponder::stcMDNSServiceQuery::stcAnswer*
2034
2035
MDNSResponder::stcMDNSServiceQuery::answerAtIndex (uint32_t p_u32Index)
2035
2036
{
2036
- return (stcAnswer*)(((const stcMDNSServiceQuery*)this )->answerAtIndex (p_u32Index));
2037
+ const auto & cref = static_cast <const decltype (*this )>(*this );
2038
+ return const_cast <stcAnswer*>(cref.answerAtIndex (p_u32Index));
2037
2039
}
2038
2040
2039
2041
/*
0 commit comments