Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Unified Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc

Issue 2649233002: Fix a space problem with the use of XkbKeyboardLayoutEngine::xkb_flag_map_ (Closed)
Patch Set: addressed spang's remark Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
index b72f6f208e3fd8deb9939b8cae47183269bc1802..c6da6de226cb25fa11bcbe0522fefad91b4752c7 100644
--- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
+++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc
@@ -821,7 +821,7 @@ void XkbKeyboardLayoutEngine::SetKeymap(xkb_keymap* keymap) {
{ui::EF_MOD3_DOWN, "Mod3"},
{ui::EF_CAPS_LOCK_ON, XKB_MOD_NAME_CAPS}};
xkb_flag_map_.clear();
- xkb_flag_map_.resize(arraysize(flags));
+ xkb_flag_map_.reserve(arraysize(flags));
for (size_t i = 0; i < arraysize(flags); ++i) {
xkb_mod_index_t index = xkb_keymap_mod_get_index(keymap, flags[i].xkb_name);
if (index == XKB_MOD_INVALID) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698