Util: Change operators to the evaluated order
This commit is contained in:
+4
-4
@@ -100,12 +100,12 @@ System System::operator|(System rhs)
|
||||
return rhs;
|
||||
}
|
||||
|
||||
System System::operator||(System rhs)
|
||||
System System::operator&&(System rhs)
|
||||
{
|
||||
auto lhs = *this;
|
||||
|
||||
lhs.exec();
|
||||
if (lhs.m_status == 0) {
|
||||
if (lhs.m_status > 0) {
|
||||
return lhs;
|
||||
}
|
||||
|
||||
@@ -116,12 +116,12 @@ System System::operator||(System rhs)
|
||||
return rhs;
|
||||
}
|
||||
|
||||
System System::operator&&(System rhs)
|
||||
System System::operator||(System rhs)
|
||||
{
|
||||
auto lhs = *this;
|
||||
|
||||
lhs.exec();
|
||||
if (lhs.m_status > 0) {
|
||||
if (lhs.m_status == 0) {
|
||||
return lhs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user