Skip to content

Transition battery_t to return const pointers instead of copies where possible #1252

@brtietz

Description

@brtietz

battery_t::get_params() returns a copy of the entire params object, which includes copying lifetime arrays. This can be a major user of memory and decreases runtime to do frequent copying.

At the moment, all functions in ssc have been migrated to call out for their specific data, but it may still be helpful to make this return a const pointer for increased speed/memory. There are some potential downstream headaches with battery_t's copy constructors to watch out for in this migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions