summaryrefslogtreecommitdiff
path: root/include/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-13 08:27:17 +0200
committerNoel Grandin <noel@peralex.com>2016-04-13 13:27:50 +0200
commit7573abfdef5b02f37d3bb7040a282f13e791101c (patch)
treefb336f017ab508ec75ec084f0dcc4a956db95736 /include/basic
parent97abbec95665b43a9a09e10a0fb31854cdbd5c0d (diff)
update loplugin passstuffbyref to check return types
of methods like Foo getFoo() const { return m_foo; } where we can rather do const Foo& getFoo() const { return m_foo; } and let the client code decide if it wants copy Foo. Inspired by a performance problem where we were unwittingly copy constructing a large struct repeatedly just so client code could interrogate the members of the struct. When all of the changes this plugin finds are applied, I find that 'perf stat make check' shows on average a 1.7% reduction in CPU cycles. Change-Id: Ic27b4f817aa98f2a2a009f2d4e4a962cbe9c613e
Diffstat (limited to 'include/basic')
0 files changed, 0 insertions, 0 deletions