Skip to content

Remove const return-by-value from signs functions #2387

@mandeepsandhu

Description

@mandeepsandhu

There are a few functions in the odin/signs.h that are returning a std::string by const value, eg:

const std::string GetGuideBranchString(uint32_t max_count = 0,
                                           bool limit_by_consecutive_count = false,
                                           const std::string& delim = "/",
                                           const VerbalTextFormatter* verbal_formatter = nullptr) const;

Returning by const-value prevents rvalue moves (C++11 and higher), which can degrade performance, and offer almost no benefit.

We should remove const from all functions returning by value.

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