From abd7079c5ac42718c18ac05322da330853a92f57 Mon Sep 17 00:00:00 2001 From: tastytea Date: Fri, 20 Mar 2020 14:47:44 +0100 Subject: Allow argument in constructor of Connection to be const. --- include/connection.hpp | 4 ++-- include/instance.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/connection.hpp b/include/connection.hpp index c6d557c..67bc6f1 100644 --- a/include/connection.hpp +++ b/include/connection.hpp @@ -85,7 +85,7 @@ public: * * @since 0.1.0 */ - explicit Connection(Instance &instance) + explicit Connection(const Instance &instance) : _instance{instance} , _baseuri{instance.get_baseuri()} { @@ -292,7 +292,7 @@ public: CURLWrapper::cancel_stream(); } private: - Instance &_instance; + const Instance &_instance; const string_view _baseuri; [[nodiscard]] diff --git a/include/instance.hpp b/include/instance.hpp index 1997068..fb85a03 100644 --- a/include/instance.hpp +++ b/include/instance.hpp @@ -94,7 +94,7 @@ public: * * @since 0.3.0 */ - inline void copy_connection_properties(CURLWrapper &curlwrapper) + inline void copy_connection_properties(CURLWrapper &curlwrapper) const { curlwrapper.setup_connection_properties(_proxy, _access_token, _cainfo, _useragent); -- cgit v1.2.3-54-g00ecf