chore: IKeyState, use auto where possible
This commit is contained in:
parent
8123166e66
commit
ee3dffc4f8
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ IKeyState::IKeyState(IEventQueue *events)
|
||||||
|
|
||||||
IKeyState::KeyInfo *IKeyState::KeyInfo::alloc(KeyID id, KeyModifierMask mask, KeyButton button, int32_t count)
|
IKeyState::KeyInfo *IKeyState::KeyInfo::alloc(KeyID id, KeyModifierMask mask, KeyButton button, int32_t count)
|
||||||
{
|
{
|
||||||
KeyInfo *info = (KeyInfo *)malloc(sizeof(KeyInfo));
|
auto *info = (KeyInfo *)malloc(sizeof(KeyInfo));
|
||||||
info->m_key = id;
|
info->m_key = id;
|
||||||
info->m_mask = mask;
|
info->m_mask = mask;
|
||||||
info->m_button = button;
|
info->m_button = button;
|
||||||
|
|
@ -43,7 +43,7 @@ IKeyState::KeyInfo *IKeyState::KeyInfo::alloc(
|
||||||
const char *buffer = screens.c_str();
|
const char *buffer = screens.c_str();
|
||||||
|
|
||||||
// build structure
|
// build structure
|
||||||
KeyInfo *info = (KeyInfo *)malloc(sizeof(KeyInfo) + screens.size());
|
auto *info = (KeyInfo *)malloc(sizeof(KeyInfo) + screens.size());
|
||||||
info->m_key = id;
|
info->m_key = id;
|
||||||
info->m_mask = mask;
|
info->m_mask = mask;
|
||||||
info->m_button = button;
|
info->m_button = button;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue