[ox/std] Replace an unsafe buffer
All checks were successful
Build / build (push) Successful in 2m38s

This commit is contained in:
Gary Talent 2024-11-26 22:31:20 -06:00
parent cd3eeeef14
commit cee4f65d4a

View File

@ -472,13 +472,13 @@ OX_CLANG_NOWARN_END
}, },
}; };
int main(int argc, const char **args) { int main(int argc, const char **argv) {
if (argc < 2) { if (argc < 2) {
oxError("Must specify test to run"); oxError("Must specify test to run");
return -1;
} }
OX_CLANG_NOWARN_BEGIN(-Wunsafe-buffer-usage) auto const args = ox::SpanView{argv, static_cast<size_t>(argc)};
auto const testName = args[1]; auto const testName = args[1];
OX_CLANG_NOWARN_END
auto const func = tests.find(testName); auto const func = tests.find(testName);
if (func != tests.end()) { if (func != tests.end()) {
oxAssert(func->second(), "Test returned Error"); oxAssert(func->second(), "Test returned Error");