peer_connection_handle::find_plugin should be const

This commit is contained in:
Steven Siloti 2017-05-28 21:08:47 -07:00 committed by Arvid Norberg
parent a9e5ef1521
commit 8e600c2201
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ struct TORRENT_EXPORT peer_connection_handle
connection_type type() const; connection_type type() const;
void add_extension(std::shared_ptr<peer_plugin>); void add_extension(std::shared_ptr<peer_plugin>);
peer_plugin const* find_plugin(string_view type); peer_plugin const* find_plugin(string_view type) const;
bool is_seed() const; bool is_seed() const;

View File

@ -57,7 +57,7 @@ void peer_connection_handle::add_extension(std::shared_ptr<peer_plugin> ext)
#endif #endif
} }
peer_plugin const* peer_connection_handle::find_plugin(string_view type) peer_plugin const* peer_connection_handle::find_plugin(string_view type) const
{ {
#ifndef TORRENT_DISABLE_EXTENSIONS #ifndef TORRENT_DISABLE_EXTENSIONS
std::shared_ptr<peer_connection> pc = native_handle(); std::shared_ptr<peer_connection> pc = native_handle();