[webkit-dev] ENABLE macro placement between includes
Kirsling, Ross
Ross.Kirsling at sony.com
Tue Aug 15 18:13:16 PDT 2023
I would support specifying the common pattern in our styleguide.
Ross
From: Alex Christensen via webkit-dev <webkit-dev at lists.webkit.org>
Reply-To: Alex Christensen <achristensen at apple.com>
Date: Thursday, August 3, 2023 at 2:52 PM
To: Webkit Development List <webkit-dev at lists.webkit.org>
Subject: [webkit-dev] ENABLE macro placement between includes
Our coding style says to include config.h, then the primary header, then other headers. It does not say where to put any ENABLE macros in that list.
We have about 1700 places where we follow this pattern:
#include "config.h"
#include "RemoteSampler.h"
#if ENABLE(GPU_PROCESS)
…
#endif
We have about 350 places where we follow this pattern:
#include "config.h"
#if ENABLE(WEBGL)
#include "WebGLUniformLocation.h"
…
#endif
The less common pattern has the advantage of not needing to search the directory where the header is if the feature is not enabled, but I like the more common pattern more and I think it matches our style guidelines better. Should we specify one or the other, or should we not specify this in our coding style?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20230816/9986dc92/attachment.htm>
More information about the webkit-dev
mailing list