From bc1d1ba59f031c2d320564b53dd31f069b97464e Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 10 Nov 2013 22:51:52 +0000 Subject: [PATCH] Fix warnings --- src/buffer_manager.cc | 2 +- src/normal.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffer_manager.cc b/src/buffer_manager.cc index 77e1d66e..4894dc65 100644 --- a/src/buffer_manager.cc +++ b/src/buffer_manager.cc @@ -109,7 +109,7 @@ CandidateList BufferManager::complete_buffername(const String& prefix, if (not include_dirs and buffer->flags() & Buffer::Flags::File) { ByteCount pos = name.find_last_of('/'); - if (pos != String::npos) + if (pos != (int)String::npos) match_name = name.substr(pos); } diff --git a/src/normal.cc b/src/normal.cc index 74810f62..932488f5 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -812,7 +812,7 @@ static CharCount get_column(const Buffer& buffer, auto& line = buffer[coord.line]; auto col = 0_char; for (auto it = line.begin(); - it != line.end() and ByteCount{it - line.begin()} < coord.column; + it != line.end() and coord.column > (int)(it - line.begin()); it = utf8::next(it)) { if (*it == '\t')