Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate various APIs to fs::path #7151

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Migrate various APIs to fs::path #7151

wants to merge 2 commits into from

Conversation

mx
Copy link
Collaborator

@mx mx commented Aug 9, 2023

DO NOT MERGE this yet. This pull request will end up with several more commits as part of it. I'm opening it early to test Windows CI.

mx added 2 commits August 8, 2023 23:40
It's different on Windows; a native string is wide. So on Windows this
would just be an infinite recursion, rather than what we actually want.
Copy link
Collaborator

@baconpaul baconpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One copy we don’t need

@@ -245,25 +247,20 @@ bool FxUserPreset::hasPresetsForSingleType(int id)
return scannedPresets.find(id) != scannedPresets.end();
}

void FxUserPreset::saveFxIn(SurgeStorage *storage, FxStorage *fx, const std::string &s)
void FxUserPreset::saveFxIn(SurgeStorage *storage, FxStorage *fx, fs::path sp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be const fs::path &

@@ -72,7 +72,7 @@ struct FxUserPreset
bool hasPresetsForSingleType(int type_id);
bool readFromXMLSnapshot(Preset &p, TiXmlElement *);

void saveFxIn(SurgeStorage *s, FxStorage *fxdata, const std::string &fn);
void saveFxIn(SurgeStorage *s, FxStorage *fxdata, fs::path sp);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Const & again to avoid thencopy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants