[studio] Fix build
All checks were successful
Build / build (push) Successful in 3m23s

This commit is contained in:
Gary Talent 2025-01-22 00:58:43 -06:00
parent 5fe7c14ccb
commit e1282b6bae

View File

@ -37,10 +37,28 @@ class Module {
template<typename Editor>
[[nodiscard]]
studio::EditorMaker editorMaker(studio::StudioContext &ctx, ox::StringParam ext) noexcept {
EditorMaker editorMaker(StudioContext &ctx, ox::StringParam ext) noexcept {
return {
{std::move(ext)},
[&ctx](ox::StringViewCR path) -> ox::Result<studio::BaseEditor*> {
[&ctx](ox::StringViewCR path) -> ox::Result<BaseEditor*> {
return ox::makeCatch<Editor>(ctx, path);
}
};
}
template<typename Editor>
[[nodiscard]]
EditorMaker editorMaker(StudioContext &ctx, std::initializer_list<ox::StringView> exts) noexcept {
return {
[&exts] {
ox::Vector<ox::String> fileTypes;
fileTypes.reserve(exts.size());
for (auto &s : exts) {
fileTypes.emplace_back(s);
}
return fileTypes;
}(),
[&ctx](ox::StringViewCR path) -> ox::Result<BaseEditor*> {
return ox::makeCatch<Editor>(ctx, path);
}
};