[ox] Make ox::String::String(const char*) explicit

This commit is contained in:
2023-12-01 22:36:24 -06:00
parent e9822bf124
commit 1a1c8ae6cc
13 changed files with 83 additions and 105 deletions

View File

@ -112,7 +112,7 @@ static std::map<std::string_view, ox::Error(*)()> tests = {
{
"ClawHeaderReader",
[] {
ox::String hdr = "O1;com.drinkingtea.ox.claw.test.Header;2;";
ox::String hdr("O1;com.drinkingtea.ox.claw.test.Header;2;");
auto [ch, err] = ox::readClawHeader(hdr.c_str(), hdr.len() + 1);
oxAssert(err, "Error parsing header");
oxAssert(ch.fmt == ox::ClawFormat::Organic, "Format wrong");
@ -124,7 +124,7 @@ static std::map<std::string_view, ox::Error(*)()> tests = {
{
"ClawHeaderReader2",
[] {
ox::String hdr = "M2;com.drinkingtea.ox.claw.test.Header2;3;";
ox::String hdr("M2;com.drinkingtea.ox.claw.test.Header2;3;");
auto [ch, err] = ox::readClawHeader(hdr.c_str(), hdr.len() + 1);
oxAssert(err, "Error parsing header");
oxAssert(ch.fmt == ox::ClawFormat::Metal, "Format wrong");