mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
dangling pointer crash semi-fix, minor bug fixes, minor code correctness enhancements
This commit is contained in:
6
uart.cpp
6
uart.cpp
@@ -95,7 +95,7 @@ uart_input::recall_bindings() {
|
||||
|
||||
auto const bindingtype { typelookup->second };
|
||||
std::array<user_command, 2> bindingcommands { user_command::none, user_command::none };
|
||||
auto const commandcount { ( bindingtype == toggle ? 2 : 1 ) };
|
||||
auto const commandcount { ( bindingtype == input_type_t::toggle ? 2 : 1 ) };
|
||||
for( int commandidx = 0; commandidx < commandcount; ++commandidx ) {
|
||||
// grab command(s) associated with the input pin
|
||||
auto const bindingcommandname { entryparser.getToken<std::string>() };
|
||||
@@ -166,14 +166,14 @@ void uart_input::poll()
|
||||
|
||||
auto const type { std::get<input_type_t>( entry ) };
|
||||
auto const action { (
|
||||
type != impulse ?
|
||||
type != input_type_t::impulse ?
|
||||
GLFW_PRESS :
|
||||
( true == state ?
|
||||
GLFW_PRESS :
|
||||
GLFW_RELEASE ) ) };
|
||||
|
||||
auto const command { (
|
||||
type != toggle ?
|
||||
type != input_type_t::toggle ?
|
||||
std::get<2>( entry ) :
|
||||
( true == state ?
|
||||
std::get<2>( entry ) :
|
||||
|
||||
Reference in New Issue
Block a user