Merge pull request #15656 from keymanapp/refactor/core/cleanup

refactor(core): cleanup 

- fix whitespace
- rename private fields of `ldml_processor` to start with underscore

Precedes: #15609
This commit is contained in:
Eberhard Beilharz 2026-03-04 15:27:47 +01:00 committed by GitHub
commit 87da33796a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 14 deletions

View file

@ -243,7 +243,7 @@ void ldml_event_state::emit_backspace() {
// else loop again
assert(end.type != KM_CORE_CT_END); // inappropriate here.
state->context().pop_back();
}
}
/*
We couldn't find a character at end of context (context is empty),
so we'll pass the backspace keystroke on to the app to process; the
@ -532,10 +532,10 @@ ldml_event_state::ldml_event_state(
uint8_t i,
uint16_t e) {
this->state = s;
this->vk = v;
this->modifier_state = m;
this->is_key_down = i;
this->event_flags = e;
this->_vk = v;
this->_modifier_state = m;
this->_is_key_down = i;
this->_event_flags = e;
actions.persist_options = new km_core_option_item[1];
actions.persist_options[0] = NULL_OPTIONS[0];

View file

@ -178,10 +178,10 @@ public:
size_t context_to_string(std::u32string &str, bool include_markers = true);
private:
km_core_virtual_key vk;
uint16_t modifier_state;
uint8_t is_key_down;
uint16_t event_flags;
km_core_virtual_key _vk;
uint16_t _modifier_state;
uint8_t _is_key_down;
uint16_t _event_flags;
km_core_state *state;
// our in-flight action struct.
@ -194,12 +194,12 @@ public:
// implementation
km_core_virtual_key
ldml_event_state::get_vk() const {
return vk;
return _vk;
}
uint16_t
ldml_event_state::get_modifier_state() const {
return modifier_state;
return _modifier_state;
}
} // namespace core

View file

@ -18,7 +18,7 @@ protected:
km_core_keyboard_dispose(this->keyboard);
this->keyboard = nullptr;
}
}
}
};
TEST_F(KmCoreKeyboardApiTests, LoadFromBlob) {

View file

@ -239,7 +239,7 @@ kbd_log = custom_target(test_kbd + '.kmx'.underscorify(),
input: kbd_src,
command: kmc_cmd + ['build', '--debug', '--no-compiler-version', '@INPUT@', '--out-file', kbd_obj]
)
test('imx_list', imx_e, depends: kbd_log, args: [kbd_obj] )
test('imx_list', imx_e, depends: kbd_log, args: [kbd_obj] )
external_e = executable('ext_event_tests', ['kmx_external_event.tests.cpp', common_test_files],
cpp_args: defns + warns,
@ -258,4 +258,4 @@ kbd_log = custom_target(test_kbd + '.kmx'.underscorify(),
input: kbd_src,
command: kmc_cmd + ['build', '--debug', '--no-compiler-version', '@INPUT@', '--out-file', kbd_obj]
)
test('ext_event', external_e, depends: kbd_log, args: [kbd_obj] )
test('ext_event', external_e, depends: kbd_log, args: [kbd_obj] )