ext/include/iv/character.h in iv-phonic-0.0.9 vs ext/include/iv/character.h in iv-phonic-0.1.0

- old
+ new

@@ -722,12 +722,12 @@ using std::upper_bound; if (c < 1000) { return static_cast<Category>(kCategoryCache[c]); } const int result = - upper_bound(kCategoryKeys.begin(), - kCategoryKeys.end(), c) - kCategoryKeys.begin() - 1; + static_cast<int>(upper_bound(kCategoryKeys.begin(), + kCategoryKeys.end(), c) - kCategoryKeys.begin() - 1); assert(result < static_cast<int>(kCategoryKeys.size())); const int high = kCategoryValues[result * 2]; if (c <= high) { const int code = kCategoryValues[result * 2 + 1]; if (code < 0x100) { @@ -814,11 +814,11 @@ return kLowerCaseCache[c - 192]; } std::tr1::array<uint16_t, 101>::const_iterator it = upper_bound(kLowerCaseKeys.begin(), kLowerCaseKeys.end(), c) - 1; - const int result = it - kLowerCaseKeys.begin(); + const int result = static_cast<int>(it - kLowerCaseKeys.begin()); assert(result < 101); if (result >= 0) { bool by2 = false; const uint16_t start = kLowerCaseKeys[result]; uint16_t end = kLowerCaseValues[result * 2]; @@ -850,10 +850,10 @@ return kUpperCaseCache[c - 181]; } std::tr1::array<uint16_t, 113>::const_iterator it = upper_bound(kUpperCaseKeys.begin(), kUpperCaseKeys.end(), c) - 1; - const int result = it - kUpperCaseKeys.begin(); + const int result = static_cast<int>(it - kUpperCaseKeys.begin()); assert(result < 113); if (result >= 0) { bool by2 = false; const uint16_t start = *it; uint16_t end = kUpperCaseValues[result * 2];