Re: aaditya - r31457 - in abiword/branches/gsoc2012_rotated_text/src: af/gr/xp text/fmt/xp

From: Hubert Figuière <hfiguiere_at_teaser.fr>
Date: Tue Jul 03 2012 - 02:40:24 CEST

On 02/07/12 01:08 AM, cvs@abisource.com wrote:

> Modified: abiword/branches/gsoc2012_rotated_text/src/af/gr/xp/gr_Graphics.cpp
> ===================================================================
> --- abiword/branches/gsoc2012_rotated_text/src/af/gr/xp/gr_Graphics.cpp 2012-07-01 23:48:00 UTC (rev 31456)
> +++ abiword/branches/gsoc2012_rotated_text/src/af/gr/xp/gr_Graphics.cpp 2012-07-02 08:08:09 UTC (rev 31457)
> @@ -636,6 +636,18 @@
> return true;
> }
>
> +double GR_Graphics::getTextAngle(void)
> +{
> + // returns the value of rotation that has been set by setRotationAngle()
> + return m_rTextAngle;
> +}

As a general rule, if it is a getter function it should be:

-const
-inlined in the header if it is just getting the member function.

> +
> +void GR_Graphics::setTextAngle(double angle)
> +{
> + // the function is called from fp_FrameContainer::draw() and has been set there.
> + m_rTextAngle = angle;
> +}

A setter that short can also be inlined.

These rules applies mostly everywhere.

Hub
Received on Tue Jul 3 02:41:47 2012

This archive was generated by hypermail 2.1.8 : Tue Jul 03 2012 - 02:41:47 CEST