From ef4fb5fb578fe6f67c9e57d6db7e7fe4e1d555f2 Mon Sep 17 00:00:00 2001 From: Martin Olivier Date: Mon, 6 Jan 2025 00:05:22 +0100 Subject: [PATCH] dylib: fix decorations constructors build failure Signed-off-by: Martin Olivier --- include/dylib.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/include/dylib.hpp b/include/dylib.hpp index 484033b..c42f50d 100644 --- a/include/dylib.hpp +++ b/include/dylib.hpp @@ -61,18 +61,21 @@ static_assert(std::is_pointer::value, "Expecting HINSTANCE t static_assert(std::is_pointer::value, "Expecting FARPROC to be a pointer"); struct decorations { - const char *prefix{""}; - const char *suffix{""}; + const char *prefix; + const char *suffix; + + decorations() : prefix(""), suffix("") {} + decorations(const char *prefix, const char *suffix) : prefix(prefix), suffix(suffix) {} static decorations none() noexcept { return decorations(); } static decorations os_default() noexcept { - return decorations { + return decorations( DYLIB_WIN_OTHER("", "lib"), - DYLIB_WIN_MAC_OTHER(".dll", ".dylib", ".so"), - }; + DYLIB_WIN_MAC_OTHER(".dll", ".dylib", ".so") + ); } std::string decorate(const std::string &lib_name) const {