Skip to content

Fix Raw*() accessors to stored data to return proper const pointers #2

@russell-taylor

Description

@russell-taylor

The current approach of putting the const after the hrgls_Message type makes a const pointer, which is ignored by the compiler and is not doing what we want. We want the const to be before the declaration (to make the object constant), but doing this requires explicitly putting const pointers to the base structs because the pointer typedefs do not have their objects made const when they are made const. We must then modify parameters (including the struct keyword for C examples) in the hrgls_api.h functions so that the const-ness doesn't get us into trouble along the way.

This will ripple all the way through the library.

An example:

hrgls_Message const RawMessage() const;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions