From b4c46f78da230ff3077bc2b96ac66f5ac017c7a2 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 15 Dec 2013 12:49:06 +1100 Subject: Make single argument constructors explicit to avoid unexpected conversions. --- src/Selection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Selection.h') diff --git a/src/Selection.h b/src/Selection.h index d7c7d79ad..956a0f99d 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -88,9 +88,9 @@ struct SelectionRange { SelectionRange() : caret(), anchor() { } - SelectionRange(SelectionPosition single) : caret(single), anchor(single) { + explicit SelectionRange(SelectionPosition single) : caret(single), anchor(single) { } - SelectionRange(int single) : caret(single), anchor(single) { + explicit SelectionRange(int single) : caret(single), anchor(single) { } SelectionRange(SelectionPosition caret_, SelectionPosition anchor_) : caret(caret_), anchor(anchor_) { } -- cgit v1.2.3