diff options
author | 2014-03-07 05:19:10 +0000 | |
---|---|---|
committer | 2014-03-07 14:19:56 +0900 | |
commit | 865e6cf49764f3a411ee32861d927b15653ee398 (patch) | |
tree | b2bf63fccf769acd2766b8d5ca8eaa602dccce4a /native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp | |
parent | a1e0ef4836f59a9fd5a2b44ecb94c27227e159c6 (diff) | |
download | latinime-865e6cf49764f3a411ee32861d927b15653ee398.tar.gz latinime-865e6cf49764f3a411ee32861d927b15653ee398.tar.xz latinime-865e6cf49764f3a411ee32861d927b15653ee398.zip |
Revert "Revert "Use std::min() and std::max()""
This reverts commit f63000abeabfaabde5c1ea2201d63d0c4850f1e2.
Change-Id: I6056d176a13c6ecad38e658ab8778bd898291d02
Diffstat (limited to 'native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp')
-rw-r--r-- | native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp b/native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp index 7c7b05ca8..ecc9fdab1 100644 --- a/native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp +++ b/native/jni/src/suggest/policyimpl/dictionary/header/header_policy.cpp @@ -16,6 +16,8 @@ #include "suggest/policyimpl/dictionary/header/header_policy.h" +#include <algorithm> + namespace latinime { // Note that these are corresponding definitions in Java side in DictionaryHeader. @@ -72,7 +74,7 @@ void HeaderPolicy::readHeaderValueOrQuestionMark(const char *const key, int *out outValue[1] = '\0'; return; } - const int terminalIndex = min(static_cast<int>(it->second.size()), outValueSize - 1); + const int terminalIndex = std::min(static_cast<int>(it->second.size()), outValueSize - 1); for (int i = 0; i < terminalIndex; ++i) { outValue[i] = it->second[i]; } |