Review Request: Add functions to get the size of a component

Laszlo Papp lpapp at kde.org
Wed Aug 22 19:25:45 UTC 2012



> On Aug. 20, 2012, 3 p.m., Arjen Hiemstra wrote:
> > engine/component.h, line 27
> > <http://git.reviewboard.kde.org/r/106047/diff/3/?file=78221#file78221line27>
> >
> >     No need to include AAB here, just forward-declare it and include it in the .cpp.
> 
> Felix Rohrbach wrote:
>     No, as I return a AxisAlignedBox in boundingBox, not a Pointer to it. (Also, my compiler tells me so)
> 
> Arjen Hiemstra wrote:
>     That's pretty strange, considering we do something similar in https://projects.kde.org/projects/playground/games/gluon/repository/revisions/master/entry/engine/gameobject.h#L236 and QMatrix4x4 is only pre-declared there.

I agree with Arjen about this. If you do not have the implementation inside the header (like in this case), then the forward declaration of the incomplete type should be working without a pointer as far as I understand it.

See this for further information:
http://stackoverflow.com/questions/553682/when-to-use-forward-declaration


- Laszlo


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


On Aug. 21, 2012, 11:07 p.m., Felix Rohrbach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106047/
> -----------------------------------------------------------
> 
> (Updated Aug. 21, 2012, 11:07 p.m.)
> 
> 
> Review request for Gluon.
> 
> 
> Description
> -------
> 
> I'd like to have these functions to compute the size of GameObjects.
> 
> 
> Diffs
> -----
> 
>   core/CMakeLists.txt 3d94d84 
>   core/axisalignedbox.h PRE-CREATION 
>   core/axisalignedbox.cpp PRE-CREATION 
>   engine/component.h db86220 
>   engine/component.cpp 2999d84 
> 
> Diff: http://git.reviewboard.kde.org/r/106047/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Felix Rohrbach
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/gluon/attachments/20120822/c8a8159a/attachment.html>


More information about the Gluon mailing list