aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/PositionCache.cxx4
-rw-r--r--src/RESearch.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index a46c13004..82cda7b78 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -392,7 +392,7 @@ static inline int KeyFromString(const char *charBytes, size_t len) {
}
SpecialRepresentations::SpecialRepresentations() {
- std::fill(startByteHasReprs, startByteHasReprs+0x100, 0);
+ std::fill(startByteHasReprs, startByteHasReprs+0x100, static_cast<short>(0));
}
void SpecialRepresentations::SetRepresentation(const char *charBytes, const char *value) {
@@ -433,7 +433,7 @@ bool SpecialRepresentations::Contains(const char *charBytes, size_t len) const {
void SpecialRepresentations::Clear() {
mapReprs.clear();
- std::fill(startByteHasReprs, startByteHasReprs+0x100, 0);
+ std::fill(startByteHasReprs, startByteHasReprs+0x100, static_cast<short>(0));
}
void BreakFinder::Insert(int val) {
diff --git a/src/RESearch.cxx b/src/RESearch.cxx
index 4e290309c..3509c3f22 100644
--- a/src/RESearch.cxx
+++ b/src/RESearch.cxx
@@ -256,9 +256,9 @@ RESearch::RESearch(CharClassify *charClassTable) {
charClass = charClassTable;
sta = NOP; /* status of lastpat */
bol = 0;
- std::fill(bittab, bittab + BITBLK, 0);
+ std::fill(bittab, bittab + BITBLK, static_cast<unsigned char>(0));
std::fill(tagstk, tagstk + MAXTAG, 0);
- std::fill(nfa, nfa + MAXNFA, 0);
+ std::fill(nfa, nfa + MAXNFA, '\0');
Clear();
}