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

Make input parameters const? #78

Open
glampert opened this issue Jun 17, 2021 · 0 comments
Open

Make input parameters const? #78

glampert opened this issue Jun 17, 2021 · 0 comments

Comments

@glampert
Copy link

glampert commented Jun 17, 2021

Input pointer parameters in the function signatures are not const, e.g.:

static meow_u128 MeowHash(void *Seed128Init, meow_umm Len, void *SourceInit)

This gives the impression to readers on a glance that the functions are actually modifying the data they are hashing, which I'm fairly sure is not the case!

It also has the inconvenience that to hash an object that is already const qualified you have to add an explicit cast, e.g.:

uint64_t HashBlob(const Blob* pBlob)
{
    result = MeowHash(MySeed, sizeof(Blob), (void*)pBlob);
    ...
}

Could we please have the function signatures updated to take all input parameters by const pointer?
Thanks!

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

No branches or pull requests

1 participant