From 9afc044002e871cd63c5dce1b3e88e5885002748 Mon Sep 17 00:00:00 2001 From: Fabian Posch Date: Thu, 11 Jan 2024 17:21:49 -0500 Subject: [PATCH] make to_string for uuid_t const (like i should have to begin with) --- include/db_types.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/db_types.hpp b/include/db_types.hpp index 5dcff65..5230217 100644 --- a/include/db_types.hpp +++ b/include/db_types.hpp @@ -78,7 +78,7 @@ inline bool operator!=(int const & lhs, uuid_t const & rhs) { // easier conversion to string -inline std::string to_string(uuid_t const &value) { +inline std::string to_string(const uuid_t& value) { std::ostringstream uuid_s; uuid_s << std::hex; uuid_s << std::setfill('0') << std::setw(16) << value.uuid_upper; @@ -87,7 +87,7 @@ inline std::string to_string(uuid_t const &value) { } // stream operations -inline std::ostream& operator<<(std::ostream& os, uuid_t& value) { +inline std::ostream& operator<<(std::ostream& os, const uuid_t& value) { os << to_string(value); return os; };