[Mesa-dev] [PATCH 3/3] gallium: whitespace, comment formatting fixes in p_defines.h

Brian Paul brianp at vmware.com
Thu Feb 26 07:26:29 PST 2015


On 02/26/2015 07:59 AM, Emil Velikov wrote:
> On 26/02/15 00:06, Brian Paul wrote:
>> Just to keep things consistent.
>> ---
>>   src/gallium/include/pipe/p_defines.h | 66 ++++++++++++++++++++----------------
>>   1 file changed, 36 insertions(+), 30 deletions(-)
>>
>> diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
>> index 1a9d80e..a8ffe9c 100644
>> --- a/src/gallium/include/pipe/p_defines.h
>> +++ b/src/gallium/include/pipe/p_defines.h
>> @@ -41,7 +41,8 @@ extern "C" {
>>    * - A negative value always means failure.
>>    * - The meaning of a positive value is function dependent.
>>    */
>> -enum pipe_error {
>> +enum pipe_error
>> +{
> Bit of a silly question:
>
> Does anyone knows how to grep for the declaration of an enum/struct with
> this change ?
>
> Normally I use something like
>   $ git grep "^enum foo {"
>
> This patch moves us away from it, as it's the less common syntax so I'm
> not objecting in any way.

I don't have a preference for whether the opening brace is on the same 
line or the next.  I just like consistency.

As for the grep, can't you use '$' to match EOL: git grep "^enum foo$" ?
It's actually one less keystroke! :)

-Brian




More information about the mesa-dev mailing list