mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 14:24:56 +00:00
Add True and False tests for bitwise enums
This commit is contained in:
2
hecl/extern/athena
vendored
2
hecl/extern/athena
vendored
Submodule hecl/extern/athena updated: 0b3fd2b5af...b40d3b17e5
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: af4b1a4521...c1d3d040bf
@@ -241,7 +241,7 @@ void Console::handleSpecialKeyDown(boo::ESpecialKey sp, boo::EModifierKey mod, b
|
||||
break;
|
||||
case boo::ESpecialKey::Backspace: {
|
||||
if (!m_commandString.empty()) {
|
||||
if ((mod & boo::EModifierKey::Ctrl) != boo::EModifierKey::None) {
|
||||
if (True(mod & boo::EModifierKey::Ctrl)) {
|
||||
size_t index = m_commandString.rfind(' ', size_t(m_cursorPosition - 1));
|
||||
|
||||
if (index == std::string::npos) {
|
||||
@@ -267,7 +267,7 @@ void Console::handleSpecialKeyDown(boo::ESpecialKey sp, boo::EModifierKey mod, b
|
||||
if ((m_cursorPosition + 1) >= int(m_commandString.size()))
|
||||
break;
|
||||
|
||||
if ((mod & boo::EModifierKey::Ctrl) != boo::EModifierKey::None) {
|
||||
if (True(mod & boo::EModifierKey::Ctrl)) {
|
||||
size_t index = m_commandString.find_first_of(' ', size_t(m_cursorPosition + 1));
|
||||
if (index != std::string::npos)
|
||||
m_commandString.erase(size_t(m_cursorPosition + 1), index + 1);
|
||||
@@ -303,7 +303,7 @@ void Console::handleSpecialKeyDown(boo::ESpecialKey sp, boo::EModifierKey mod, b
|
||||
if (m_cursorPosition < 0)
|
||||
break;
|
||||
|
||||
if ((mod & boo::EModifierKey::Ctrl) != boo::EModifierKey::None)
|
||||
if (True(mod & boo::EModifierKey::Ctrl))
|
||||
m_cursorPosition = int(m_commandString.rfind(' ', size_t(m_cursorPosition) - 1));
|
||||
else
|
||||
m_cursorPosition--;
|
||||
@@ -316,7 +316,7 @@ void Console::handleSpecialKeyDown(boo::ESpecialKey sp, boo::EModifierKey mod, b
|
||||
if (m_cursorPosition >= int(m_commandString.size() - 1))
|
||||
break;
|
||||
|
||||
if ((mod & boo::EModifierKey::Ctrl) != boo::EModifierKey::None) {
|
||||
if (True(mod & boo::EModifierKey::Ctrl)) {
|
||||
if (m_commandString[size_t(m_cursorPosition)] == ' ')
|
||||
m_cursorPosition++;
|
||||
|
||||
|
||||
@@ -555,7 +555,7 @@ bool Compiler::compileFile(SystemStringView file, std::string_view baseName, std
|
||||
break;
|
||||
}
|
||||
out.second += Format(fmt,
|
||||
(attr.first & boo::VertexSemantic::Instanced) != boo::VertexSemantic::None
|
||||
True(attr.first & boo::VertexSemantic::Instanced)
|
||||
? " | boo::VertexSemantic::Instanced"
|
||||
: "",
|
||||
attr.second);
|
||||
|
||||
Reference in New Issue
Block a user