summaryrefslogtreecommitdiff
path: root/decoder/ff_charset.cc
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-08-09 01:36:36 -0400
committerChris Dyer <cdyer@cab.ark.cs.cmu.edu>2012-08-09 01:36:36 -0400
commitb6474b5cdbf870725371b32670c9dc28671e394c (patch)
treef52dde8c7aec577e5ba92bc1375845b4846bbc65 /decoder/ff_charset.cc
parent454ef7fd3a37a7d3105d6bf0f5750047979da2d4 (diff)
fixes for new word api
Diffstat (limited to 'decoder/ff_charset.cc')
-rw-r--r--decoder/ff_charset.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/decoder/ff_charset.cc b/decoder/ff_charset.cc
index 33afc1a7..472de82b 100644
--- a/decoder/ff_charset.cc
+++ b/decoder/ff_charset.cc
@@ -7,9 +7,9 @@ using namespace std;
NonLatinCount::NonLatinCount(const string& param) : FeatureFunction(), fid_(FD::Convert("NonLatinCount")) {}
-bool ContainsNonLatin(const char* word) {
- int cur = 0;
- while(word[cur]) {
+bool ContainsNonLatin(const string& word) {
+ unsigned cur = 0;
+ while(cur < word.size()) {
const int size = UTF8Len(word[cur]);
if (size > 1) return true;
cur += size;