[Mesa-dev] [PATCH] i965/cfg: Remove redundant #pragma once.
Francisco Jerez
currojerez at riseup.net
Wed Mar 9 21:37:44 UTC 2016
Iago Toral <itoral at igalia.com> writes:
> On Tue, 2016-03-08 at 17:42 -0800, Francisco Jerez wrote:
>> brw_cfg.h already has include guards, remove the "#pragma once" which
>> is redundant and non-standard.
>
> FWIW, I think using both #pragma once and include guards is a way to
> keep portability while still getting the performance advantage of
> #pragma once where it is supported.
>
It's highly unlikely to make any significant difference on any
reasonably modern compiler. I cannot measure any change in compilation
time locally from my cleanup.
> Also it seems that we do the same thing in many other files...
>
Really? I'm not aware of any other file where we use both.
>> ---
>> src/mesa/drivers/dri/i965/brw_cfg.h | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_cfg.h b/src/mesa/drivers/dri/i965/brw_cfg.h
>> index 405020b..a2ca6b1 100644
>> --- a/src/mesa/drivers/dri/i965/brw_cfg.h
>> +++ b/src/mesa/drivers/dri/i965/brw_cfg.h
>> @@ -25,7 +25,6 @@
>> *
>> */
>>
>> -#pragma once
>> #ifndef BRW_CFG_H
>> #define BRW_CFG_H
>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160309/6b07adc4/attachment.sig>
More information about the mesa-dev
mailing list