Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 805ac949 authored by Ken Wakasa's avatar Ken Wakasa
Browse files

Fix string.compare() logic. It happens to be working luckily.

Change-Id: I262c6d5779124e5b09ad1a66ca3c9ddb2fc6d7d5
parent 71b379df
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -40,8 +40,9 @@ class AdditionalProximityChars {
    static const int32_t EN_US_ADDITIONAL_U[];

    static bool isEnLocale(const std::string *locale_str) {
        return locale_str && locale_str->size() >= LOCALE_EN_US.size()
                && LOCALE_EN_US.compare(0, LOCALE_EN_US.size(), *locale_str);
        const size_t LOCALE_EN_US_SIZE = LOCALE_EN_US.size();
        return locale_str && locale_str->size() >= LOCALE_EN_US_SIZE
                && locale_str->compare(0, LOCALE_EN_US_SIZE, LOCALE_EN_US) == 0;
    }

 public:
@@ -84,10 +85,6 @@ class AdditionalProximityChars {
            return 0;
        }
    }

    static bool hasAdditionalChars(const std::string *locale_str, const int32_t c) {
        return getAdditionalCharsSize(locale_str, c) > 0;
    }
};
} // namespace latinime
#endif // LATINIME_ADDITIONAL_PROXIMITY_CHARS_H