~singpolyma/biboumi

8997021b2e43f61b6120ecce80b8097c3c451a48 — louiz’ 5 years ago b1564e4
Fix two more warnings
1 files changed, 2 insertions(+), 2 deletions(-)

M src/utils/string.cpp
M src/utils/string.cpp => src/utils/string.cpp +2 -2
@@ 15,11 15,11 @@ std::vector<std::string> cut(const std::string& val, const std::size_t size)
      // Get the number of chars, <= size, that contain only whole
      // UTF-8 codepoints.
      std::size_t s = 0;
      auto codepoint_size = utils::get_next_codepoint_size(val[pos + s]);
      auto codepoint_size = utils::get_next_codepoint_size(static_cast<unsigned char>(val[pos + s]));
      while (s + codepoint_size <= size && pos + s < val.size())
        {
          s += codepoint_size;
          codepoint_size = utils::get_next_codepoint_size(val[pos + s]);
          codepoint_size = utils::get_next_codepoint_size(static_cast<unsigned char>(val[pos + s]));
        }
      res.emplace_back(val.substr(pos, s));
      pos += s;