From 510b4eaaaed7042ee4af66183107e3f4d8020b41 Mon Sep 17 00:00:00 2001 From: yhirose Date: Mon, 17 Aug 2020 13:39:49 -0400 Subject: [PATCH] Fix #613 --- httplib.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/httplib.h b/httplib.h index bf2f64c..a6f9ee8 100644 --- a/httplib.h +++ b/httplib.h @@ -697,13 +697,13 @@ enum Error { class Result { public: Result(std::shared_ptr res, Error err) : res_(res), err_(err) {} - operator bool() { return res_ != nullptr; } + operator bool() const { return res_ != nullptr; } bool operator==(std::nullptr_t) const { return res_ == nullptr; } bool operator!=(std::nullptr_t) const { return res_ != nullptr; } - const Response &value() { return *res_; } - const Response &operator*() { return *res_; } - const Response *operator->() { return res_.get(); } - Error error() { return err_; } + const Response &value() const { return *res_; } + const Response &operator*() const { return *res_; } + const Response *operator->() const { return res_.get(); } + Error error() const { return err_; } private: std::shared_ptr res_;