You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Style: Set clang-format Standard to c++14
This commit is contained in:
@@ -130,10 +130,10 @@ List<StringName> InputMap::get_actions() const {
|
||||
return actions;
|
||||
}
|
||||
|
||||
List<Ref<InputEvent> >::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const {
|
||||
List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const {
|
||||
ERR_FAIL_COND_V(!p_event.is_valid(), NULL);
|
||||
|
||||
for (List<Ref<InputEvent> >::Element *E = p_action.inputs.front(); E; E = E->next()) {
|
||||
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
|
||||
|
||||
const Ref<InputEvent> e = E->get();
|
||||
|
||||
@@ -185,7 +185,7 @@ void InputMap::action_erase_event(const StringName &p_action, const Ref<InputEve
|
||||
|
||||
ERR_FAIL_COND_MSG(!input_map.has(p_action), _suggest_actions(p_action));
|
||||
|
||||
List<Ref<InputEvent> >::Element *E = _find_event(input_map[p_action], p_event);
|
||||
List<Ref<InputEvent>>::Element *E = _find_event(input_map[p_action], p_event);
|
||||
if (E) {
|
||||
input_map[p_action].inputs.erase(E);
|
||||
if (Input::get_singleton()->is_action_pressed(p_action)) {
|
||||
@@ -204,9 +204,9 @@ void InputMap::action_erase_events(const StringName &p_action) {
|
||||
Array InputMap::_get_action_list(const StringName &p_action) {
|
||||
|
||||
Array ret;
|
||||
const List<Ref<InputEvent> > *al = get_action_list(p_action);
|
||||
const List<Ref<InputEvent>> *al = get_action_list(p_action);
|
||||
if (al) {
|
||||
for (const List<Ref<InputEvent> >::Element *E = al->front(); E; E = E->next()) {
|
||||
for (const List<Ref<InputEvent>>::Element *E = al->front(); E; E = E->next()) {
|
||||
|
||||
ret.push_back(E->get());
|
||||
}
|
||||
@@ -215,7 +215,7 @@ Array InputMap::_get_action_list(const StringName &p_action) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
const List<Ref<InputEvent> > *InputMap::get_action_list(const StringName &p_action) {
|
||||
const List<Ref<InputEvent>> *InputMap::get_action_list(const StringName &p_action) {
|
||||
|
||||
const Map<StringName, Action>::Element *E = input_map.find(p_action);
|
||||
if (!E)
|
||||
@@ -243,7 +243,7 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
|
||||
|
||||
bool pressed;
|
||||
float strength;
|
||||
List<Ref<InputEvent> >::Element *event = _find_event(E->get(), p_event, &pressed, &strength);
|
||||
List<Ref<InputEvent>>::Element *event = _find_event(E->get(), p_event, &pressed, &strength);
|
||||
if (event != NULL) {
|
||||
if (p_pressed != NULL)
|
||||
*p_pressed = pressed;
|
||||
|
||||
Reference in New Issue
Block a user