[nostalgia] Replace C strings with ox::StringView

This commit is contained in:
2022-12-31 17:14:43 -06:00
parent 55ea405a54
commit 679226ef73
31 changed files with 81 additions and 75 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ class ItemMaker {
fileExt(std::move(pFileExt)) {
}
virtual ~ItemMaker() noexcept = default;
virtual ox::Error write(core::Context *ctx, const char *pName) const noexcept = 0;
virtual ox::Error write(core::Context *ctx, ox::CRStringView pName) const noexcept = 0;
};
template<typename T>
@@ -44,7 +44,7 @@ class ItemMakerT: public ItemMaker {
item(std::forward(pItem)),
fmt(pFmt) {
}
ox::Error write(core::Context *ctx, const char *pName) const noexcept override {
ox::Error write(core::Context *ctx, ox::CRStringView pName) const noexcept override {
const auto path = ox::sfmt("{}/{}.{}", parentDir, pName, fileExt);
auto sctx = core::applicationData<studio::StudioContext>(ctx);
return sctx->project->writeObj(path, &item, fmt);