mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
remove std::visit because apple is functionally retarded and does not support it despite claiming to support c++14
This commit is contained in:
parent
6c1d18412c
commit
f10269b03e
3 changed files with 8 additions and 10 deletions
|
@ -501,7 +501,10 @@ namespace llarp
|
|||
LookupNameAsync(lnsName, [msg, lnsName, reply](auto maybe) mutable {
|
||||
if (maybe.has_value())
|
||||
{
|
||||
std::visit([&](auto&& value) { msg.AddMXReply(value.ToString(), 1); }, *maybe);
|
||||
if (auto* addr = std::get_if<service::Address>(&*maybe))
|
||||
{
|
||||
msg.AddMXReply(addr->ToString(), 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -294,15 +294,6 @@ namespace llarp::rpc
|
|||
reply(CreateJSONError("we could not find an exit with that name"));
|
||||
return;
|
||||
}
|
||||
std::visit(
|
||||
[&](auto&& value) {
|
||||
if (value.IsZero())
|
||||
{
|
||||
reply(CreateJSONError("lokinet exit does not exist"));
|
||||
return;
|
||||
}
|
||||
},
|
||||
*maybe);
|
||||
if (auto ptr = std::get_if<service::Address>(&*maybe))
|
||||
{
|
||||
mapExit(*ptr);
|
||||
|
|
|
@ -827,6 +827,10 @@ namespace llarp
|
|||
}
|
||||
|
||||
auto maybeInvalidateCache = [handler, &cache, name](auto result) {
|
||||
if (result and result->IsZero())
|
||||
{
|
||||
result = std::nullopt;
|
||||
}
|
||||
if (result)
|
||||
{
|
||||
cache.Put(name, *result);
|
||||
|
|
Loading…
Reference in a new issue