From f07042f7d709b11d46732f8b48b334971b54f18f Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 15 Dec 2013 20:43:27 +0000 Subject: [PATCH] Use binding-list fire helper. --- src/Input/FGKeyboardInput.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Input/FGKeyboardInput.cxx b/src/Input/FGKeyboardInput.cxx index 4cc139996..8ff3d0a81 100644 --- a/src/Input/FGKeyboardInput.cxx +++ b/src/Input/FGKeyboardInput.cxx @@ -231,9 +231,7 @@ void FGKeyboardInput::doKey (int k, int modifiers, int x, int y) SG_LOG( SG_INPUT, SG_DEBUG, "User pressed key " << k << " with modifiers " << modifiers ); if (!b.last_state || b.is_repeatable) { const binding_list_t &bindings = _find_key_bindings(k, modifiers); - - for (unsigned int i = 0; i < bindings.size(); i++) - bindings[i]->fire(); + fireBindingList(bindings); b.last_state = 1; } } @@ -242,8 +240,7 @@ void FGKeyboardInput::doKey (int k, int modifiers, int x, int y) SG_LOG(SG_INPUT, SG_DEBUG, "User released key " << k << " with modifiers " << modifiers); if (b.last_state) { const binding_list_t &bindings = _find_key_bindings(k, modifiers); - for (unsigned int i = 0; i < bindings.size(); i++) - bindings[i]->fire(); + fireBindingList(bindings); b.last_state = 0; } }