[webkit-dev] Proposal: Use #pragma once instead of header guards

Frédéric WANG fred.wang at free.fr
Thu Jul 14 11:17:45 PDT 2016


FYI, I just performed that change as part of a general cleanup of MathML
headers:

https://trac.webkit.org/changeset/203228

The code style guidelines still mention the old-style header guards so
it should probably be updated:

https://webkit.org/code-style-guidelines/#names-header-guards

Le 10/03/2016 à 02:27, Anders Carlsson a écrit :
> Hi floks,
>
> Currently we use 
>
> #ifndef Header_h
> #define Header_h
>
>>
> #endif
>
> I propose that we instead start using
>
> #pragma once
>
> which does the same thing. It can be faster on some compilers, is less error prone and is one line instead of three! All compilers we use support #pragma once.
>
> Thoughts?
> - Anders
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160714/a10422f1/attachment.sig>


More information about the webkit-dev mailing list