mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-09 14:20:06 +00:00
fix: access members directly
This commit is contained in:
parent
044a66210d
commit
a0ae1a6bfd
@ -244,13 +244,13 @@ struct result
|
|||||||
{
|
{
|
||||||
if(other.is_ok())
|
if(other.is_ok())
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->succ_)) success_type(other.as_ok());
|
auto tmp = ::new(std::addressof(this->succ_)) success_type(other.succ_);
|
||||||
assert(tmp == std::addressof(this->succ_));
|
assert(tmp == std::addressof(this->succ_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->fail_)) failure_type(other.as_err());
|
auto tmp = ::new(std::addressof(this->fail_)) failure_type(other.fail_);
|
||||||
assert(tmp == std::addressof(this->fail_));
|
assert(tmp == std::addressof(this->fail_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
@ -259,13 +259,13 @@ struct result
|
|||||||
{
|
{
|
||||||
if(other.is_ok())
|
if(other.is_ok())
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->succ_)) success_type(std::move(other.as_ok()));
|
auto tmp = ::new(std::addressof(this->succ_)) success_type(std::move(other.succ_));
|
||||||
assert(tmp == std::addressof(this->succ_));
|
assert(tmp == std::addressof(this->succ_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->fail_)) failure_type(std::move(other.as_err()));
|
auto tmp = ::new(std::addressof(this->fail_)) failure_type(std::move(other.fail_));
|
||||||
assert(tmp == std::addressof(this->fail_));
|
assert(tmp == std::addressof(this->fail_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
@ -276,13 +276,13 @@ struct result
|
|||||||
this->cleanup();
|
this->cleanup();
|
||||||
if(other.is_ok())
|
if(other.is_ok())
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->succ_)) success_type(other.as_ok());
|
auto tmp = ::new(std::addressof(this->succ_)) success_type(other.succ_);
|
||||||
assert(tmp == std::addressof(this->succ_));
|
assert(tmp == std::addressof(this->succ_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->fail_)) failure_type(other.as_err());
|
auto tmp = ::new(std::addressof(this->fail_)) failure_type(other.fail_);
|
||||||
assert(tmp == std::addressof(this->fail_));
|
assert(tmp == std::addressof(this->fail_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
@ -294,13 +294,13 @@ struct result
|
|||||||
this->cleanup();
|
this->cleanup();
|
||||||
if(other.is_ok())
|
if(other.is_ok())
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->succ_)) success_type(std::move(other.as_ok()));
|
auto tmp = ::new(std::addressof(this->succ_)) success_type(std::move(other.succ_));
|
||||||
assert(tmp == std::addressof(this->succ_));
|
assert(tmp == std::addressof(this->succ_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto tmp = ::new(std::addressof(this->fail_)) failure_type(std::move(other.as_err()));
|
auto tmp = ::new(std::addressof(this->fail_)) failure_type(std::move(other.fail_));
|
||||||
assert(tmp == std::addressof(this->fail_));
|
assert(tmp == std::addressof(this->fail_));
|
||||||
(void)tmp;
|
(void)tmp;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user