mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 20:27:42 +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;
|
break;
|
||||||
case boo::ESpecialKey::Backspace: {
|
case boo::ESpecialKey::Backspace: {
|
||||||
if (!m_commandString.empty()) {
|
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));
|
size_t index = m_commandString.rfind(' ', size_t(m_cursorPosition - 1));
|
||||||
|
|
||||||
if (index == std::string::npos) {
|
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()))
|
if ((m_cursorPosition + 1) >= int(m_commandString.size()))
|
||||||
break;
|
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));
|
size_t index = m_commandString.find_first_of(' ', size_t(m_cursorPosition + 1));
|
||||||
if (index != std::string::npos)
|
if (index != std::string::npos)
|
||||||
m_commandString.erase(size_t(m_cursorPosition + 1), index + 1);
|
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)
|
if (m_cursorPosition < 0)
|
||||||
break;
|
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));
|
m_cursorPosition = int(m_commandString.rfind(' ', size_t(m_cursorPosition) - 1));
|
||||||
else
|
else
|
||||||
m_cursorPosition--;
|
m_cursorPosition--;
|
||||||
@@ -316,7 +316,7 @@ void Console::handleSpecialKeyDown(boo::ESpecialKey sp, boo::EModifierKey mod, b
|
|||||||
if (m_cursorPosition >= int(m_commandString.size() - 1))
|
if (m_cursorPosition >= int(m_commandString.size() - 1))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((mod & boo::EModifierKey::Ctrl) != boo::EModifierKey::None) {
|
if (True(mod & boo::EModifierKey::Ctrl)) {
|
||||||
if (m_commandString[size_t(m_cursorPosition)] == ' ')
|
if (m_commandString[size_t(m_cursorPosition)] == ' ')
|
||||||
m_cursorPosition++;
|
m_cursorPosition++;
|
||||||
|
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ bool Compiler::compileFile(SystemStringView file, std::string_view baseName, std
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
out.second += Format(fmt,
|
out.second += Format(fmt,
|
||||||
(attr.first & boo::VertexSemantic::Instanced) != boo::VertexSemantic::None
|
True(attr.first & boo::VertexSemantic::Instanced)
|
||||||
? " | boo::VertexSemantic::Instanced"
|
? " | boo::VertexSemantic::Instanced"
|
||||||
: "",
|
: "",
|
||||||
attr.second);
|
attr.second);
|
||||||
|
|||||||
Reference in New Issue
Block a user