Skip to content

Make input parameters const? #78

@glampert

Description

@glampert

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions