C++ meaning |= and &=
问题 I have a part of code that contains the following functions: void Keyboard(int key) { switch (key) { case GLFW_KEY_A: m_controlState |= TDC_LEFT; break; case GLFW_KEY_D: m_controlState |= TDC_RIGHT; break; case GLFW_KEY_W: m_controlState |= TDC_UP; break; case GLFW_KEY_S: m_controlState |= TDC_DOWN; break; default: Test::Keyboard(key); } } void KeyboardUp( int key) { switch (key) { case GLFW_KEY_A: m_controlState &= ~TDC_LEFT; break; case GLFW_KEY_D: m_controlState &= ~TDC_RIGHT; break; case