1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

remove llarp::StrEq

This commit is contained in:
jeff 2020-08-28 11:05:29 +00:00
parent bbc749294e
commit 52d20968a7
3 changed files with 1 additions and 17 deletions

View file

@ -365,7 +365,7 @@ llarp_getifaddr(const char* ifname, int af, struct sockaddr* addr)
{
// llarp::LogInfo(__FILE__, "scanning ", i->ifa_name, " af: ",
// std::to_string(i->ifa_addr->sa_family));
if (llarp::StrEq(i->ifa_name, ifname) && i->ifa_addr->sa_family == af)
if (std::string_view{i->ifa_name} == std::string_view{ifname} && i->ifa_addr->sa_family == af)
{
// can't do this here
// llarp::Addr a(*i->ifa_addr);

View file

@ -46,19 +46,6 @@ namespace llarp
return vals.count(str) > 0;
}
bool
StrEq(const char* s1, const char* s2)
{
size_t sz1 = strlen(s1);
size_t sz2 = strlen(s2);
if (sz1 == sz2)
{
return strncmp(s1, s2, sz1) == 0;
}
return false;
}
constexpr static char whitespace[] = " \t\n\r\f\v";
std::string_view

View file

@ -7,9 +7,6 @@
namespace llarp
{
bool
StrEq(const char* s1, const char* s2);
bool
IsFalseValue(std::string_view str);