mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 04:27:14 +02:00
Rearrange error_code::failed to improve codegen
This commit is contained in:
@ -230,18 +230,20 @@ public:
|
|||||||
|
|
||||||
BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
|
BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
|
||||||
{
|
{
|
||||||
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|
if( lc_flags_ & 1 )
|
||||||
|
|
||||||
if( lc_flags_ == 1 )
|
|
||||||
{
|
{
|
||||||
std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ );
|
#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|
||||||
return ec.value() != 0;
|
if( lc_flags_ == 1 )
|
||||||
|
{
|
||||||
|
std::error_code const& ec = *reinterpret_cast<std::error_code const*>( d2_ );
|
||||||
|
return ec.value() != 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return (lc_flags_ & 1) != 0;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user