From 3a5bb051a81887961b7e06d39db44c98da1a256c Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 23 Sep 2017 13:18:00 +0900 Subject: [PATCH] Small code style tweak --- src/normal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/normal.cc b/src/normal.cc index c4ccf2da..5c3bd2a6 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1121,9 +1121,9 @@ void select_object(Context& context, NormalParams params) const int count = params.count <= 0 ? 0 : params.count - 1; on_next_key_with_autoinfo(context, KeymapMode::Object, [count](Key key, Context& context) { - auto cp = key.codepoint().value_or((Codepoint)-1); - if (cp == -1 or key == Key::Escape) + if (not key.codepoint() or key == Key::Escape) return; + const auto cp = *key.codepoint(); static constexpr struct ObjectType {