fix multiple definition functions

This commit is contained in:
ohyzha
2024-11-08 15:49:26 +02:00
parent 84d323dcfa
commit 21e89346d9

View File

@@ -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<int>(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);