Review Request: Achievements 4: GameProject::achievements()

Laszlo Papp lpapp at kde.org
Wed Jul 13 22:03:48 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101933/#review4710
-----------------------------------------------------------



engine/gameproject.cpp
<http://git.reviewboard.kde.org/r/101933/#comment4135>

    const Achievement*& achievement ?
    
    1) More clear to me this will not modify the method argument if I take a look at the header file
    
    2) It helps with the compiler optimization. With a 'const p*& foo', the compiler can know that the data foo points to won't be modified if it's not const, the compiler has to assume the data could be modified by certain actions, such as writing to another pointer of the same type, or by calling a non-inlined function
    
    3) QList append/remove uses const T& where this case is also implied.


- Laszlo


On July 13, 2011, 6:28 p.m., Felix Rohrbach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101933/
> -----------------------------------------------------------
> 
> (Updated July 13, 2011, 6:28 p.m.)
> 
> 
> Review request for Gluon.
> 
> 
> Summary
> -------
> 
> Create a function that returns a list of all achievements of a GameProject.
> 
> 
> Diffs
> -----
> 
>   engine/achievement.h 79337b1 
>   engine/achievement.cpp 53a6917 
>   engine/assets/other/achievements/achievementsasset.cpp PRE-CREATION 
>   engine/gameproject.h 805d193 
>   engine/gameproject.cpp 8d84024 
>   engine/gameprojectprivate.h 38c442a 
>   engine/gameprojectprivate.cpp 08424b1 
> 
> Diff: http://git.reviewboard.kde.org/r/101933/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Felix
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/gluon/attachments/20110713/e9989475/attachment.htm 


More information about the Gluon mailing list