[webkit-dev] Coding convention of constants

Dimitri Glazkov dglazkov at chromium.org
Thu Jul 9 20:16:19 PDT 2009


If we're voting, then +1 to [1]. If we're not voting, then oops.

:DG<

On Thu, Jul 9, 2009 at 12:50 PM, Darin Adler<darin at apple.com> wrote:
> On Jul 8, 2009, at 9:08 PM, KwangYul Seo wrote:
>
> I found another style which starts with "k".
> [4] platform/chromium/PopupMenuChromium.cpp
> static const int kMaxVisibleRows = 20;
> static const int kMaxHeight = 500;
> static const int kBorderSize = 1;
> static const TimeStamp kTypeAheadTimeoutMs = 1000;
>
>
> 2009/7/9 KwangYul Seo <kwangyul.seo at gmail.com>
>>
>> Hi,
>> It seems that there are three coding styles regarding "static const int"
>> constants.
>> [1] rendering/RenderImage.cpp
>> static const int maxAltTextWidth = 1024;
>> static const int maxAltTextHeight = 256;
>>
>> [2] rendering/RenderVideo.cpp  (prefixed with c)
>> static const int cDefaultWidth = 300;
>> static const int cDefaultHeight = 150;
>>
>> [3] storage/SQLTransaction.cpp (start with a capital letter)
>> static const int DefaultQuotaSizeIncrease = 1048576;
>>
>> http://webkit.org/coding/coding-style.html
>> WebKit Coding Style Guidelines does not mention this issue.
>> All 3 styles are acceptable?
>
> I don’t think we have consensus on this yet.
> I personally prefer (1).
>     -- Darin
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
>


More information about the webkit-dev mailing list