[ox] Correct bad bit_cast uses and improve constexpr-ness
This commit is contained in:
@ -95,8 +95,7 @@ Error PassThroughFS::ls(const char *dir, F cb) noexcept {
|
||||
const auto di = std::filesystem::directory_iterator(m_path / stripSlash(dir), ec);
|
||||
oxReturnError(OxError(ec.value(), "PassThroughFS: ls failed"));
|
||||
for (auto &p : di) {
|
||||
const auto u8p = p.path().filename().u8string();
|
||||
oxReturnError(cb(bit_cast<const char*>(u8p.c_str()), 0));
|
||||
oxReturnError(cb(p.path().filename().c_str(), 0));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user