From e824ddb35b856860a3c723738e8044b9d5bef9b1 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Fri, 23 Oct 2015 13:27:01 +0100 Subject: [PATCH] Remove redundant check and make it an assert. --- include/boost/regex/v4/fileiter.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/v4/fileiter.hpp b/include/boost/regex/v4/fileiter.hpp index 4873a0a8..256a7e46 100644 --- a/include/boost/regex/v4/fileiter.hpp +++ b/include/boost/regex/v4/fileiter.hpp @@ -225,11 +225,11 @@ public: mapfile_iterator() { node = 0; file = 0; offset = 0; } mapfile_iterator(const mapfile* f, long arg_position) { + BOOST_ASSERT(f); file = f; node = f->_first + arg_position / mapfile::buf_size; offset = arg_position % mapfile::buf_size; - if(file) - file->lock(node); + file->lock(node); } mapfile_iterator(const mapfile_iterator& i) {