From 05b58706d75cfff48bc8162ecd24e8c46dd0cfa4 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Sun, 21 Aug 2022 17:39:58 -0700 Subject: [PATCH] clarified what Input::register_binding does. It returns a handle! --- include/blah/input.h | 12 ++++++------ src/input.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/blah/input.h b/include/blah/input.h index c5b1afb..5ec2f03 100644 --- a/include/blah/input.h +++ b/include/blah/input.h @@ -791,13 +791,13 @@ namespace Blah // sets the string contents of the clipboard void set_clipboard(const String& text); - // registers a new binding - ButtonBindingRef register_binding(const ButtonBinding& binding); + // registers a new binding and returns a handle to it + ButtonBindingRef register_binding(const ButtonBinding& binding_data); - // registers a new axis binding - AxisBindingRef register_binding(const AxisBinding& binding); + // registers a new binding and returns a handle to it + AxisBindingRef register_binding(const AxisBinding& binding_data); - // registers a new stick binding - StickBindingRef register_binding(const StickBinding& binding); + // registers a new binding and returns a handle to it + StickBindingRef register_binding(const StickBinding& binding_data); } } \ No newline at end of file diff --git a/src/input.cpp b/src/input.cpp index 5fda7cf..e0228ef 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -403,23 +403,23 @@ void Input::set_clipboard(const String& text) App::Internal::platform->set_clipboard(text); } -ButtonBindingRef Input::register_binding(const ButtonBinding& binding) +ButtonBindingRef Input::register_binding(const ButtonBinding& binding_data) { - auto result = Ref(new ButtonBinding(binding)); + auto result = Ref(new ButtonBinding(binding_data)); g_buttons.push_back(result); return result; } -AxisBindingRef Input::register_binding(const AxisBinding& binding) +AxisBindingRef Input::register_binding(const AxisBinding& binding_data) { - auto result = Ref(new AxisBinding(binding)); + auto result = Ref(new AxisBinding(binding_data)); g_axes.push_back(result); return result; } -StickBindingRef Input::register_binding(const StickBinding& binding) +StickBindingRef Input::register_binding(const StickBinding& binding_data) { - auto result = Ref(new StickBinding(binding)); + auto result = Ref(new StickBinding(binding_data)); g_sticks.push_back(result); return result; }