summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2020-03-20 14:47:44 +0100
committertastytea2020-03-20 14:47:44 +0100
commitabd7079c5ac42718c18ac05322da330853a92f57 (patch)
tree418fe7987b799f5eace85c5a6c133b43f62cb233
parent9d37bebdc8e507e331f05869acfac71137e998bb (diff)
downloadmastodonpp-abd7079c5ac42718c18ac05322da330853a92f57.tar
mastodonpp-abd7079c5ac42718c18ac05322da330853a92f57.tar.gz
mastodonpp-abd7079c5ac42718c18ac05322da330853a92f57.zip
Allow argument in constructor of Connection to be const.
-rw-r--r--include/connection.hpp4
-rw-r--r--include/instance.hpp2
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);