diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2024-06-17 17:37:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 17:37:36 +0200 |
| commit | 28ce0e0f804de50f75eab797bc404c1be0b54442 (patch) | |
| tree | 5f8dc0161f41c52837bbbb9992bc86ec19b3a95b /src/protocols/XDGShell.cpp | |
| parent | a9c7a0830fd9a8b9fc4065f1cd654efd1326691a (diff) | |
misc: a few compiler level performance optimisations (#6559)
* window: use const references instead of copies
use const references instead of wasteful copies and make the = operator
check for self assignment and return early. also use const in all the
other operators.
* listener: pass std::function as const reference
instead of copies pass the std::functions as const references.
* config: dont unnecessarily convert to c_str
getHyprlangConfigValuePtr wants an std::string and we already have an
std::string, dont convert it to a c_str only for it to be converted back
to an std::string.
* buffer: pass attributes as const reference
pass attributes as const reference instead of copies.
Diffstat (limited to 'src/protocols/XDGShell.cpp')
0 files changed, 0 insertions, 0 deletions
