Skip to content

Commit

Permalink
Add inline to getInterfaceAddresses* functions to resolve multiple de…
Browse files Browse the repository at this point in the history
…finition errors (#64)
  • Loading branch information
nightlark committed Oct 10, 2024
1 parent d6c822e commit e86532e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gmlc/netif/NetIF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ namespace netif {
* AF_UNSPEC (both)
* @return a list of addresses as text
*/
std::vector<std::string> getInterfaceAddresses(int family)
inline std::vector<std::string> getInterfaceAddresses(int family)
{
std::vector<std::string> result_list;

Expand Down Expand Up @@ -266,7 +266,7 @@ namespace netif {
* returns a list of all IPv4 addresses associated with network interfaces on the system.
* @return a list of IPv4 addresses as text
*/
std::vector<std::string> getInterfaceAddressesV4()
inline std::vector<std::string> getInterfaceAddressesV4()
{
return getInterfaceAddresses(AF_INET);
}
Expand All @@ -275,7 +275,7 @@ namespace netif {
* returns a list of all IPv6 addresses associated with network interfaces on the system.
* @return a list of IPv6 addresses as text
*/
std::vector<std::string> getInterfaceAddressesV6()
inline std::vector<std::string> getInterfaceAddressesV6()
{
return getInterfaceAddresses(AF_INET6);
}
Expand All @@ -285,7 +285,7 @@ namespace netif {
* system.
* @return a list of IPv4 and IPv6 addresses as text
*/
std::vector<std::string> getInterfaceAddressesAll()
inline std::vector<std::string> getInterfaceAddressesAll()
{
return getInterfaceAddresses(AF_UNSPEC);
}
Expand Down

0 comments on commit e86532e

Please sign in to comment.