From d4d7cd4efd89318aca6b39de365342e1fb508272 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 11 Dec 2019 17:16:06 +0100 Subject: [PATCH] Simplify is_html(). --- src/lib/uri.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/lib/uri.cpp b/src/lib/uri.cpp index fb0d30c..7780732 100644 --- a/src/lib/uri.cpp +++ b/src/lib/uri.cpp @@ -705,12 +705,7 @@ void URI::detect_encoding() bool URI::is_html() const { const RegEx re_htmlfile(".*\\.(.?html?|xml|rss)$", RegEx::RE_CASELESS); - if (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri)) - { - return true; - } - - return false; + return (_uri.substr(0, 4) == "http" || re_htmlfile.match(_uri)); } } // namespace remwharead