D8204: Make parents and children Return References
Tomaz Canabrava
noreply at phabricator.kde.org
Fri Nov 2 16:13:52 GMT 2018
tcanabrava added inline comments.
Herald added a project: KDE Edu.
Herald added a subscriber: kde-edu.
INLINE COMMENTS
> object_calcer.cc:134-136
> + mparents.push_back( parent );
> + mparents.front()->addChild( this );
> + mpropgid = mparents.front()->imp()->getPropGid( pname );
mprogid = parent->imp()->getPropGid(pname);
parent->addChild(this);
mparents.push_back(parent);
less calls to .front() ?
> object_calcer.h:108
> */
> - std::vector<ObjectCalcer*> children() const;
> + const std::vector<ObjectCalcer*>& children() const;
>
return by reference is dangerous.
> object_calcer.h:114
> */
> - virtual std::vector<ObjectCalcer*> parents() const = 0;
> + const virtual std::vector<ObjectCalcer*>& parents() const;
> /**
return by reference is dangerous.
REPOSITORY
R331 Kig
REVISION DETAIL
https://phabricator.kde.org/D8204
To: narvaez, #kde_edu
Cc: kde-edu, tcanabrava, apol, cfeck, narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20181102/3793c34f/attachment-0001.html>
More information about the kde-edu
mailing list