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

Add cista::raw::string overload of parse_value #19

Merged
merged 4 commits into from
May 3, 2024

Conversation

jbruechert
Copy link
Contributor

This one only allocates if necessary.

This one only allocates if necessary.
include/utl/parser/csv.h Show resolved Hide resolved
cista::raw::string out;

if (arg.contains(R"("")")) {
std::string mut_string = arg.to_str();
Copy link
Member

Choose a reason for hiding this comment

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

I added a cista::generic_string::erase function:
felixguendling/cista#218

With this, I hope it's possible to eliminate this temporary allocation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That seems useful, but I can't get pkg to not reset my changes as soon as I edit .pkg to update cista.

Copy link
Member

Choose a reason for hiding this comment

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

pkg will for each dependency

  • checkout the latest commit found in any .pkg file, if the commit ref does not match
  • if the commit ref matches, nothing will change (so you can do changes)

So the moment you create a commit in a dependency, you need to change the referenced version in the .pkg file to this latest commit, otherwise the previous version will be checked out.

@felixguendling
Copy link
Member

Maybe it's better to use cista::raw::generic_string directly, to make it clear that it can be both (string or string_view depending on what's needed).

@felixguendling felixguendling merged commit 55ad01b into motis-project:master May 3, 2024
0 of 10 checks passed
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