From d4482b3b144e269f5e5f4f8eba1694bb1d7b9a2c Mon Sep 17 00:00:00 2001 From: Mike Oliphant Date: Wed, 12 Jul 2023 09:50:27 -0700 Subject: [PATCH] Catch exceptions by reference --- src/nam_lv2.cpp | 2 +- src/nam_plugin.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nam_lv2.cpp b/src/nam_lv2.cpp index b6e6074..265c6cb 100644 --- a/src/nam_lv2.cpp +++ b/src/nam_lv2.cpp @@ -27,7 +27,7 @@ static LV2_Handle instantiate(const LV2_Descriptor*, double rate, const char*, c return nullptr; } - catch(const std::exception) + catch(const std::exception&) { return nullptr; } diff --git a/src/nam_plugin.cpp b/src/nam_plugin.cpp index d69c906..a691dbc 100644 --- a/src/nam_plugin.cpp +++ b/src/nam_plugin.cpp @@ -127,7 +127,7 @@ namespace NAM { memcpy(response.path, msg->path, pathlen); } - catch (std::exception) + catch (const std::exception&) { response.path[0] = '\0';