From 172593f7b95b6735082bbe9f08388a357e0f10b3 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 24 Jun 2020 08:39:27 +0200 Subject: [PATCH] Catch a CGenErr by const reference rather than by value This fixes alerts from LGTM. Signed-off-by: Stefan Weil --- src/clientdlg.cpp | 2 +- src/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 8a455762..0d2560dd 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -1079,7 +1079,7 @@ void CClientDlg::Connect ( const QString& strSelectedAddress, } } - catch ( CGenErr generr ) + catch ( const CGenErr& generr ) { // show error message and return the function QMessageBox::critical ( this, APP_NAME, generr.GetErrorText(), "Close", nullptr ); diff --git a/src/main.cpp b/src/main.cpp index 251ec0d0..67703a9c 100755 --- a/src/main.cpp +++ b/src/main.cpp @@ -706,7 +706,7 @@ int main ( int argc, char** argv ) } } - catch ( CGenErr generr ) + catch ( const CGenErr& generr ) { // show generic error #ifndef HEADLESS