From 21e89346d9c749452b711aff4ed3e294251b1d64 Mon Sep 17 00:00:00 2001 From: ohyzha Date: Fri, 8 Nov 2024 15:49:26 +0200 Subject: [PATCH] fix multiple definition functions --- openVulkanoCpp/Extensions/RymlConverters.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openVulkanoCpp/Extensions/RymlConverters.hpp b/openVulkanoCpp/Extensions/RymlConverters.hpp index fac9ec4..e5a5154 100644 --- a/openVulkanoCpp/Extensions/RymlConverters.hpp +++ b/openVulkanoCpp/Extensions/RymlConverters.hpp @@ -173,13 +173,13 @@ namespace c4 return false; } - size_t to_chars(c4::substr buf, const OpenVulkano::int24& value) + inline size_t to_chars(c4::substr buf, const OpenVulkano::int24& value) { int intValue = static_cast(value); return ryml::format(buf, "{}", intValue); } - bool from_chars(c4::csubstr buf, OpenVulkano::int24* value) + inline bool from_chars(c4::csubstr buf, OpenVulkano::int24* value) { int intValue; size_t ret = ryml::unformat(buf, "{}", intValue); @@ -228,12 +228,12 @@ namespace c4 return false; } - size_t to_chars(ryml::substr buf, const OpenVulkano::Math::RGB565& rgb) + inline size_t to_chars(ryml::substr buf, const OpenVulkano::Math::RGB565& rgb) { return ryml::format(buf, "[{},{},{}]", rgb.r, rgb.g, rgb.b); } - bool from_chars(ryml::csubstr buf, OpenVulkano::Math::RGB565* rgb) + inline bool from_chars(ryml::csubstr buf, OpenVulkano::Math::RGB565* rgb) { int r, g, b; size_t ret = ryml::unformat (buf, "[{},{},{}]", r, g, b); @@ -243,12 +243,12 @@ namespace c4 return ret != ryml::yml::npos; } - size_t to_chars(c4::substr buf, const OpenVulkano::Math::RGBA5551& color) + inline size_t to_chars(c4::substr buf, const OpenVulkano::Math::RGBA5551& color) { return ryml::format(buf, "[{},{},{},{}]", color.r, color.g, color.b, color.a); } - bool from_chars(c4::csubstr buf, OpenVulkano::Math::RGBA5551* color) + inline bool from_chars(c4::csubstr buf, OpenVulkano::Math::RGBA5551* color) { int r, g, b, a; size_t ret = ryml::unformat(buf, "[{},{},{},{}]", r, g, b, a); @@ -263,12 +263,12 @@ namespace c4 return false; } - size_t to_chars(c4::substr buf, const OpenVulkano::Math::Timestamp& ts) + inline size_t to_chars(c4::substr buf, const OpenVulkano::Math::Timestamp& ts) { return ryml::format(buf, "{}", ts.GetNanos()); } - bool from_chars(c4::csubstr buf, OpenVulkano::Math::Timestamp* ts) + inline bool from_chars(c4::csubstr buf, OpenVulkano::Math::Timestamp* ts) { uint64_t nanos; size_t ret = ryml::unformat(buf, "{}", nanos);