[nostalgia] Replace C strings with ox::StringView
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user