From 3d54271b42bfc8418d1b399794b47b1e73406dc0 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 8 Mar 2017 17:46:48 +1100 Subject: Fix warnings from Visual Studio 2017. --- src/PositionCache.cxx | 4 ++-- src/RESearch.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') 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(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(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(0)); std::fill(tagstk, tagstk + MAXTAG, 0); - std::fill(nfa, nfa + MAXNFA, 0); + std::fill(nfa, nfa + MAXNFA, '\0'); Clear(); } -- cgit v1.2.3