diff options
| author | Vitalii Trubchaninov | 2023-07-31 14:26:03 -0400 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-08-04 15:28:55 +0200 |
| commit | ed4acded380ac5408acf9fa518984cbe1bbe25bd (patch) | |
| tree | d6153517f676c5faf355729706581e84a5e40162 | |
| parent | 4acc51828f7f93f3b2058a63f54d112af4034503 (diff) | |
| download | catch3-ed4acded380ac5408acf9fa518984cbe1bbe25bd.tar.gz | |
Don't define tryTranslators function if exception are disabled
"-Wunused-function -Wall" produces if this function is defined when exceptions are disabled
| -rw-r--r-- | src/catch2/internal/catch_exception_translator_registry.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_exception_translator_registry.cpp b/src/catch2/internal/catch_exception_translator_registry.cpp index f3d47c0c..103fc9ae 100644 --- a/src/catch2/internal/catch_exception_translator_registry.cpp +++ b/src/catch2/internal/catch_exception_translator_registry.cpp @@ -15,6 +15,7 @@ namespace Catch { +#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) namespace { static std::string tryTranslators( std::vector< @@ -28,6 +29,7 @@ namespace Catch { } } +#endif //!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() { } |