Remove absl optimization

This was being used to get at gcc/clang's __builtin_expect, but we don't
really need that: we can just avoid the check entirely when not in debug
mode which should be even faster.
pull/1124/head
Jason Rhinelander 4 years ago
parent 5efcd49a3b
commit 870062e8cc

@ -6,7 +6,6 @@
#include <util/buffer.hpp>
#include <absl/base/optimization.h>
#include <functional>
#include <cstdint>
@ -140,15 +139,17 @@ namespace llarp
}
static Crypto *
instance() ABSL_ATTRIBUTE_RETURNS_NONNULL
instance()
{
if(ABSL_PREDICT_TRUE(m_crypto))
{
#ifdef NDEBUG
return m_crypto;
#else
if(m_crypto)
return m_crypto;
}
assert(false && "Cryptomanager::instance() was undefined");
abort();
#endif
}
};

Loading…
Cancel
Save