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

Use string views #104

Open
heinezen opened this issue Jun 12, 2023 · 1 comment
Open

Use string views #104

heinezen opened this issue Jun 12, 2023 · 1 comment
Labels
c++ involves C++ code good first issue Simple thing, suitable for newcomers improvement improves existing functionality proposal pending discussion about something to do

Comments

@heinezen
Copy link
Member

String views can reduce the amount of copy operations we have to do internally, e.g. for resolving fqons.

For example, string views could be helpful in this situation:

member_id = "modpack.path.to.Object";
std::vector<std::string> member_parts = util::split(member_id, '.');

The 2nd line could be a vector string views instead of normal strings

@heinezen heinezen added improvement improves existing functionality proposal pending discussion about something to do c++ involves C++ code good first issue Simple thing, suitable for newcomers labels Jun 12, 2023
@heinezen heinezen mentioned this issue Jun 12, 2023
@TheJJ
Copy link
Member

TheJJ commented Jun 12, 2023

see also #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ involves C++ code good first issue Simple thing, suitable for newcomers improvement improves existing functionality proposal pending discussion about something to do
Projects
None yet
Development

No branches or pull requests

2 participants