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

Aaditya Chauhan <[email protected]>
Newsgroups gmane.editors.abiword.devel
Message-ID <CAHAUm_YY7BXHaMmqHJtx6hRhTKqfL-m2qBYLkcPqj+AS5jRh2Q@mail.gmail.com>
Hi Hub,

Thanks for pointing this out. I will recommit the code with the
changes you have pointed out.

A doubt :-

there are functions like these, present in gr_Graphics.cpp, is there
any particular reason for not inlining them ?

void GR_Graphics::flush(void)
{
	// default implementation does nothing
}

Thanks,
Aaditya Chauhan

On 7/3/12, Hubert Figuière <[email protected]> wrote:
>
> On 02/07/12 01:08 AM, [email protected] 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
>
>


-- 
Aaditya Chauhan
Electronics and Communication
NSIT - New Delhi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.