From 58861c35b0deac34c87a5e05eb319206a6d8e30c Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 7 May 2018 19:44:11 +0800 Subject: [PATCH] Fix compile warnings on gcc 8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning was: warning: catching polymorphic type ‘class std::exception’ by value [-Wcatch-value=] --- src/base/bittorrent/session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index b8189d126..f0bdda8e7 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -2945,7 +2945,7 @@ void Session::setMaxConnectionsPerTorrent(int max) try { handle.set_max_connections(max); } - catch (std::exception) {} + catch (const std::exception &) {} } } } @@ -2967,7 +2967,7 @@ void Session::setMaxUploadsPerTorrent(int max) try { handle.set_max_uploads(max); } - catch (std::exception) {} + catch (const std::exception &) {} } } }