summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-08-23 21:28:06 +0200
committerlouiz’ <louiz@louiz.org>2018-08-23 21:28:06 +0200
commit8997021b2e43f61b6120ecce80b8097c3c451a48 (patch)
tree99ff63863a7240fd79022b92cb6c938db4dd7cda
parentb1564e4ddc3e54ad78788a6f5643056d03a41678 (diff)
downloadbiboumi-8997021b2e43f61b6120ecce80b8097c3c451a48.tar.gz
biboumi-8997021b2e43f61b6120ecce80b8097c3c451a48.tar.bz2
biboumi-8997021b2e43f61b6120ecce80b8097c3c451a48.tar.xz
biboumi-8997021b2e43f61b6120ecce80b8097c3c451a48.zip
Fix two more warnings
-rw-r--r--src/utils/string.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/string.cpp b/src/utils/string.cpp
index 635e71a..366ec1f 100644
--- a/src/utils/string.cpp
+++ b/src/utils/string.cpp
@@ -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;