[patch] backwards threader cleanups
Pedro Alves
palves@redhat.com
Wed Nov 15 13:15:00 GMT 2017
On 11/15/2017 07:34 AM, Aldy Hernandez wrote:
>
>
> On 11/14/2017 02:38 PM, David Malcolm wrote:
>> On Tue, 2017-11-14 at 14:08 -0500, Aldy Hernandez wrote:
>
>> https://gcc.gnu.org/codingconventions.html#Class_Form
>> says that:
>>
>> "When defining a class, first [...]
>> declare all public member functions,
>> [...]
>> then declare all non-public member functions, and
>> then declare all non-public member variables."
>
> Wow, I did not expect that order. Fixed.
...
>> (Is this a self-assign from this->speed_p? should the "speed_p" param
>> be renamed, e.g. to "speed_p_")
>
> Yes. Fixed.
The convention also says:
"When structs and/or classes have member functions, prefer to name
data members with a leading m_".
So in this case, the preference would be to rename this->speed_p to
m_speed_p instead.
Thanks,
Pedro Alves
More information about the Gcc-patches
mailing list