Changes from mercurial repository.

This commit is contained in:
Sorin Sbarnea 2009-10-21 16:25:08 +00:00
parent 44bb32f476
commit 98c68897d8
135 changed files with 2686 additions and 26965 deletions

View file

@ -488,7 +488,7 @@ CKeyMap::setModifierKeys()
for (SInt32 b = 0; b < kKeyModifierNumBits; ++b) {
// skip if item doesn't generate bit b
if (((1u << b) & item.m_generates) != 0) {
SInt32 mIndex = g * kKeyModifierNumBits + b;
SInt32 mIndex = (SInt32)g * kKeyModifierNumBits + b;
m_modifierKeys[mIndex].push_back(&item);
}
}
@ -684,7 +684,7 @@ CKeyMap::findBestKey(const KeyEntryList& entryList,
KeyModifierMask desiredState) const
{
// check for an item that can accommodate the desiredState exactly
for (size_t i = 0; i < entryList.size(); ++i) {
for (SInt32 i = 0; i < (SInt32)entryList.size(); ++i) {
const KeyItem& item = entryList[i].back();
if ((item.m_required & desiredState) ==
(item.m_sensitive & desiredState)) {
@ -696,7 +696,7 @@ CKeyMap::findBestKey(const KeyEntryList& entryList,
// choose the item that requires the fewest modifier changes
SInt32 bestCount = 32;
SInt32 bestIndex = -1;
for (size_t i = 0; i < entryList.size(); ++i) {
for (SInt32 i = 0; i < (SInt32)entryList.size(); ++i) {
const KeyItem& item = entryList[i].back();
KeyModifierMask change =
((item.m_required ^ desiredState) & item.m_sensitive);