Make parents and children Return References
Needs RevisionPublic

Authored by narvaez on Oct 8 2017, 3:40 PM.

Details

Reviewers
tcanabrava
Group Reviewers
KDE Edu
Summary

I will later use this to avoid some useless copy-on-assigns but this
patch is just about the ObjectCalcer classes.

Diff Detail

Branch
object-calcer-member-ref
Lint
No Linters Available
Unit
No Unit Test Coverage
narvaez created this revision.Oct 8 2017, 3:40 PM
cfeck added a subscriber: cfeck.Oct 21 2017, 12:41 PM

Please set a repository.

narvaez set the repository for this revision to R331 Kig.Oct 21 2017, 12:54 PM
apol added a subscriber: apol.Oct 22 2017, 10:57 PM

I'm not sure who is qualified to review this patch... Other than yourself. :P

If you ask me, it should probably have tests. ;)

tcanabrava added inline comments.
objects/object_calcer.cc
134–136

mprogid = parent->imp()->getPropGid(pname);
parent->addChild(this);
mparents.push_back(parent);

less calls to .front() ?

objects/object_calcer.h
108

return by reference is dangerous.

114

return by reference is dangerous.

Restricted Application added a project: KDE Edu. · View Herald TranscriptNov 2 2018, 4:13 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
tcanabrava requested changes to this revision.Nov 2 2018, 4:15 PM
This revision now requires changes to proceed.Nov 2 2018, 4:15 PM