Skip to content

Commit bcc46fa

Browse files
panoskguillaumekln
authored andcommitted
Fix non-C++ code (#10)
1 parent b7486c8 commit bcc46fa

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
build
2+
/.vs

src/Tokenizer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ namespace onmt
234234
bool cur_letter = false;
235235
bool cur_number = false;
236236
// skip special characters and BOM
237-
if (v > 32 and v != 0xFEFF)
237+
if (v > 32 && v != 0xFEFF)
238238
{
239239
if (substitutes.find(c)!=substitutes.end())
240240
c = substitutes.at(c);
@@ -311,7 +311,7 @@ namespace onmt
311311
if (_joiner_annotate) {
312312
if (_joiner_new) addjoiner = true;
313313
else {
314-
if (!letter or prev_alphabet == "placeholder")
314+
if (!letter || prev_alphabet == "placeholder")
315315
token += _joiner;
316316
else
317317
c = _joiner + c;

src/unicode/Unicode.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ namespace onmt
169169
{
170170
if (!u)
171171
return false;
172-
return (u >= 9 and u <= 13) or _find_codepoint(u, unidata_Separator);
172+
return (u >= 9 && u <= 13) || _find_codepoint(u, unidata_Separator);
173173
}
174174

175175
bool is_letter(code_point_t u, _type_letter &tl)

0 commit comments

Comments
 (0)