Skip to content

Commit

Permalink
Don't define tryTranslators function if exception are disabled
Browse files Browse the repository at this point in the history
"-Wunused-function -Wall" produces if this function is defined when exceptions are disabled
  • Loading branch information
VitaliiTrubchaninovUbisoft committed Jul 31, 2023
1 parent 4acc518 commit 267f9c1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/catch2/internal/catch_exception_translator_registry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

namespace Catch {

#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
namespace {
static std::string tryTranslators(
std::vector<
Expand All @@ -28,6 +29,7 @@ namespace Catch {
}

}
#endif //!defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)

ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() {
}
Expand Down

0 comments on commit 267f9c1

Please sign in to comment.