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

Change string& s to const string& s #213

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

Conversation

huynhtrankhanh
Copy link

This makes the hashing code easier to use. For example, I can write hashString("abc") directly instead of having to explicitly declare a new string.

Huỳnh Trần Khanh added 2 commits August 25, 2022 21:20
@simonlindholm
Copy link
Member

I'm fine with this for Hashing-codeforces, but for Hashing which is meant to be typed by hand this just adds extra characters that are seldom needed, and it would add another line to the pdf too by making hashString overrun the 63-char line limit. In the case where you get compile errors I think it's easy enough to go back and add the const manually.

(Speaking of Hashing-codeforces we should really reconsider its existence now that CF has added 64-bit support, maybe replace it by just the randomization code... For another issue though.)

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.

None yet

2 participants