[olympic,nostalgia] Rename CRStringView to StringViewCR
This commit is contained in:
@ -93,7 +93,7 @@ void ClawEditor::drawRow(ox::ModelValue const&value) noexcept {
|
||||
ImGui::Text("%s", val.c_str());
|
||||
}
|
||||
|
||||
void ClawEditor::drawVar(ObjPath &path, ox::CRStringView name, ox::ModelValue const&value) noexcept {
|
||||
void ClawEditor::drawVar(ObjPath &path, ox::StringViewCR name, ox::ModelValue const&value) noexcept {
|
||||
using Str = ox::BasicString<100>;
|
||||
path.push_back(name);
|
||||
if (value.type() == ox::ModelValue::Type::Object) {
|
||||
|
@ -23,7 +23,7 @@ class ClawEditor: public Editor {
|
||||
private:
|
||||
static void drawRow(ox::ModelValue const&value) noexcept;
|
||||
|
||||
void drawVar(ObjPath &path, ox::CRStringView name, ox::ModelValue const&value) noexcept;
|
||||
void drawVar(ObjPath &path, ox::StringViewCR name, ox::ModelValue const&value) noexcept;
|
||||
|
||||
void drawTree(ObjPath &path, ox::ModelObject const&obj) noexcept;
|
||||
};
|
||||
|
@ -34,8 +34,8 @@ static void keyEventHandler(turbine::Context &ctx, turbine::Key key, bool down)
|
||||
}
|
||||
|
||||
static ox::Error runApp(
|
||||
ox::CRStringView appName,
|
||||
ox::CRStringView projectDataDir,
|
||||
ox::StringViewCR appName,
|
||||
ox::StringViewCR projectDataDir,
|
||||
ox::UPtr<ox::FileSystem> &&fs) noexcept {
|
||||
oxRequireM(ctx, turbine::init(std::move(fs), appName));
|
||||
turbine::setWindowTitle(*ctx, keelCtx(*ctx).appName);
|
||||
@ -50,8 +50,8 @@ static ox::Error runApp(
|
||||
}
|
||||
|
||||
static ox::Error run(
|
||||
ox::CRStringView appName,
|
||||
ox::CRStringView projectDataDir,
|
||||
ox::StringViewCR appName,
|
||||
ox::StringViewCR projectDataDir,
|
||||
int,
|
||||
char const**) {
|
||||
// seed UUID generator
|
||||
|
@ -51,7 +51,7 @@ void ProjectExplorer::setModel(ox::UPtr<ProjectTreeModel> &&model) noexcept {
|
||||
m_treeModel = std::move(model);
|
||||
}
|
||||
|
||||
ox::Error ProjectExplorer::refreshProjectTreeModel(ox::CRStringView) noexcept {
|
||||
ox::Error ProjectExplorer::refreshProjectTreeModel(ox::StringViewCR) noexcept {
|
||||
oxRequireM(model, buildProjectTreeModel(*this, "Project", "/", nullptr));
|
||||
setModel(std::move(model));
|
||||
return OxError(0);
|
||||
|
@ -23,7 +23,7 @@ class ProjectExplorer: public studio::Widget {
|
||||
|
||||
void setModel(ox::UPtr<ProjectTreeModel> &&model) noexcept;
|
||||
|
||||
ox::Error refreshProjectTreeModel(ox::CRStringView = {}) noexcept;
|
||||
ox::Error refreshProjectTreeModel(ox::StringViewCR = {}) noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
inline ox::FileSystem *romFs() noexcept {
|
||||
|
@ -318,7 +318,7 @@ void StudioUI::handleKeyInput() noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
ox::Error StudioUI::createOpenProject(ox::CRStringView path) noexcept {
|
||||
ox::Error StudioUI::createOpenProject(ox::StringViewCR path) noexcept {
|
||||
std::error_code ec;
|
||||
std::filesystem::create_directories(toStdStringView(path), ec);
|
||||
oxReturnError(OxError(ec.value() != 0, "Could not create project directory"));
|
||||
@ -346,11 +346,11 @@ ox::Error StudioUI::openProjectPath(ox::StringParam path) noexcept {
|
||||
return m_projectExplorer.refreshProjectTreeModel();
|
||||
}
|
||||
|
||||
ox::Error StudioUI::openFile(ox::CRStringView path) noexcept {
|
||||
ox::Error StudioUI::openFile(ox::StringViewCR path) noexcept {
|
||||
return openFileActiveTab(path, true);
|
||||
}
|
||||
|
||||
ox::Error StudioUI::openFileActiveTab(ox::CRStringView path, bool makeActiveTab) noexcept {
|
||||
ox::Error StudioUI::openFileActiveTab(ox::StringViewCR path, bool makeActiveTab) noexcept {
|
||||
if (!m_project) {
|
||||
return OxError(1, "No project open to open a file from");
|
||||
}
|
||||
@ -394,7 +394,7 @@ ox::Error StudioUI::openFileActiveTab(ox::CRStringView path, bool makeActiveTab)
|
||||
return {};
|
||||
}
|
||||
|
||||
ox::Error StudioUI::closeFile(ox::CRStringView path) noexcept {
|
||||
ox::Error StudioUI::closeFile(ox::StringViewCR path) noexcept {
|
||||
if (!m_openFiles.contains(path)) {
|
||||
return {};
|
||||
}
|
||||
|
@ -83,15 +83,15 @@ class StudioUI: public ox::SignalHandler {
|
||||
|
||||
void handleKeyInput() noexcept;
|
||||
|
||||
ox::Error createOpenProject(ox::CRStringView path) noexcept;
|
||||
ox::Error createOpenProject(ox::StringViewCR path) noexcept;
|
||||
|
||||
ox::Error openProjectPath(ox::StringParam path) noexcept;
|
||||
|
||||
ox::Error openFile(ox::CRStringView path) noexcept;
|
||||
ox::Error openFile(ox::StringViewCR path) noexcept;
|
||||
|
||||
ox::Error openFileActiveTab(ox::CRStringView path, bool makeActiveTab) noexcept;
|
||||
ox::Error openFileActiveTab(ox::StringViewCR path, bool makeActiveTab) noexcept;
|
||||
|
||||
ox::Error closeFile(ox::CRStringView path) noexcept;
|
||||
ox::Error closeFile(ox::StringViewCR path) noexcept;
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user