Permalink
Browse files

merge macuim-mozc-using-namespace-std.patch by tomcat14d (issue #8)

  • Loading branch information...
kato
kato committed Mar 14, 2018
1 parent 1b5ecf6 commit c979f127acaeb7b35d3344e8b1e40848e1a68d54
Showing with 18 additions and 13 deletions.
  1. +15 −10 Mozc/uim/key_translator.cc
  2. +2 −2 Mozc/uim/key_translator.h
  3. +1 −1 Mozc/uim/mozc.cc
@@ -368,26 +368,31 @@ bool KeyTranslator::Translate(unsigned int keyval,
void KeyTranslator::Init() {
for (int i = 0; i < arraysize(special_key_map); ++i) {
CHECK(special_key_map_.insert(make_pair(special_key_map[i].from,
special_key_map[i].to)).second);
CHECK(special_key_map_.insert(
std::make_pair(special_key_map[i].from,
special_key_map[i].to)).second);
}
for (int i = 0; i < arraysize(modifier_key_map); ++i) {
CHECK(modifier_key_map_.insert(make_pair(modifier_key_map[i].from,
modifier_key_map[i].to)).second);
CHECK(modifier_key_map_.insert(
std::make_pair(modifier_key_map[i].from,
modifier_key_map[i].to)).second);
}
for (int i = 0; i < arraysize(modifier_mask_map); ++i) {
CHECK(modifier_mask_map_.insert(make_pair(modifier_mask_map[i].from,
modifier_mask_map[i].to)).second);
CHECK(modifier_mask_map_.insert(
std::make_pair(modifier_mask_map[i].from,
modifier_mask_map[i].to)).second);
}
for (int i = 0; i < arraysize(kana_map_jp); ++i) {
CHECK(kana_map_jp_.insert(
make_pair(kana_map_jp[i].code, make_pair(
kana_map_jp[i].no_shift, kana_map_jp[i].shift))).second);
std::make_pair(kana_map_jp[i].code,
std::make_pair(kana_map_jp[i].no_shift,
kana_map_jp[i].shift))).second);
}
for (int i = 0; i < arraysize(kana_map_us); ++i) {
CHECK(kana_map_us_.insert(
make_pair(kana_map_us[i].code, make_pair(
kana_map_us[i].no_shift, kana_map_us[i].shift))).second);
std::make_pair(kana_map_us[i].code,
std::make_pair(kana_map_us[i].no_shift,
kana_map_us[i].shift))).second);
}
}
@@ -62,8 +62,8 @@ class KeyTranslator {
private:
typedef hash_map<unsigned int, commands::KeyEvent::SpecialKey> SpecialKeyMap;
typedef map<unsigned int, commands::KeyEvent::ModifierKey> ModifierKeyMap;
typedef map<unsigned int, pair<string, string> > KanaMap;
typedef std::map<unsigned int, commands::KeyEvent::ModifierKey> ModifierKeyMap;
typedef std::map<unsigned int, std::pair<string, string> > KanaMap;
// Returns true iff key is modifier key such as SHIFT, ALT, or CAPSLOCK.
bool IsModifierKey(unsigned int keyval,
@@ -905,7 +905,7 @@ static void install_keymap(void)
int i;
for (i = 0; key_tab[i].key; i++)
key_map.insert(make_pair(key_tab[i].str, key_tab[i].key));
key_map.insert(std::make_pair(key_tab[i].str, key_tab[i].key));
}
static uim_lisp

0 comments on commit c979f12

Please sign in to comment.