Merge pull request 'Fix multiple definition functions' (#160) from misc into master
Reviewed-on: https://git.madvoxel.net/OpenVulkano/OpenVulkano/pulls/160 Reviewed-by: Georg Hagen <georg.hagen@madvoxel.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user