From 57a01e6c3271ee707d462a8668b49a15fbeeec62 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 2 Oct 2021 13:33:50 +0200 Subject: [PATCH] Remove a redundant public section in Yerbacon::Exception and make the second constructor call the first one --- src/headers/Yerbacon.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/headers/Yerbacon.hpp b/src/headers/Yerbacon.hpp index 4be8a6f..aca5457 100644 --- a/src/headers/Yerbacon.hpp +++ b/src/headers/Yerbacon.hpp @@ -31,9 +31,8 @@ namespace Yerbacon { [[nodiscard]] const char* what() const noexcept final { return exceptionCause.data(); } - public: explicit Exception(const std::string_view& cause): exceptionCause(cause) {} - Exception(const std::string_view& cause, unsigned long line): exceptionCause(('L' + std::to_string(line) + ": ").append(cause)) {} + Exception(const std::string_view& cause, unsigned long line): Exception(('L' + std::to_string(line) + ": ").append(cause)) {} }; }