Skip to content

Add static accessor/mutator conveniences #35

Description

@feltech

What

Generate static conveniences for trait accessors/mutators, such that the (C++) refcount of the TraitsData is not modified.

Why

C++ purists will balk at wrapping a TraitsData in a short-lived trait view to operate on it, likely necessitating a shared_ptr copy and refcount bump. This is a potentially measurable performance hit in large-volume operations.

E.g. we can add static variants such as getLocationFrom(const TraitsData&), and similarly setLocationTo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions