From b7d5b2189983f46adc72a1122f412f6b5373b3bb Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 31 Oct 2020 13:25:02 +0100 Subject: [PATCH] Make operator bool() in html_extract and archive_answer const. --- include/uri.hpp | 6 +++--- src/lib/uri.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/uri.hpp b/include/uri.hpp index 18946c9..18c4efb 100644 --- a/include/uri.hpp +++ b/include/uri.hpp @@ -1,5 +1,5 @@ /* This file is part of remwharead. - * Copyright © 2019 tastytea + * Copyright © 2019, 2020 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,7 +42,7 @@ struct html_extract string description; string fulltext; - explicit operator bool(); + explicit operator bool() const; }; /*! @@ -60,7 +60,7 @@ struct archive_answer string error; string uri; - explicit operator bool(); + explicit operator bool() const; }; /*! diff --git a/src/lib/uri.cpp b/src/lib/uri.cpp index 58fbd41..02658de 100644 --- a/src/lib/uri.cpp +++ b/src/lib/uri.cpp @@ -59,12 +59,12 @@ using std::unique_ptr; using std::vector; using RegEx = Poco::RegularExpression; -html_extract::operator bool() +html_extract::operator bool() const { return successful; } -archive_answer::operator bool() +archive_answer::operator bool() const { return successful; }