From e0009216ee830e8da023047ed6fe187f48f612d1 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 20 Jan 2025 21:28:25 +0100 Subject: Don't return const ref strings in ctor::configuration::get. Instead return std::string by copy. --- src/ctor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ctor.h') diff --git a/src/ctor.h b/src/ctor.h index 3c0b303..6f21aca 100644 --- a/src/ctor.h +++ b/src/ctor.h @@ -283,7 +283,7 @@ constexpr auto ctor_libdir = "ctor-libdir"; struct configuration { bool has(const std::string& key) const; - const std::string& get(const std::string& key, const std::string& default_value = {}) const; + std::string get(const std::string& key, const std::string& default_value = {}) const; ctor::toolchain host_toolchain{ctor::toolchain::none}; ctor::arch host_arch{ctor::arch::unknown}; -- cgit v1.2.3