[PATCH] cosmetic: Remove use of C++ style comments

Daniel Stone daniel at fooishbar.org
Thu Dec 3 09:19:09 PST 2015


Hi,

On 3 December 2015 at 15:54, Nils Chr. Brause <nilschrbrause at gmail.com> wrote:
> On Thu, Dec 3, 2015 at 4:31 PM, Chris Michael <cp.michael at samsung.com> wrote:
>> diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
>> index 1098f01..412719d 100644
>> --- a/src/compositor-rdp.c
>> +++ b/src/compositor-rdp.c
>> @@ -717,7 +717,7 @@ struct rdp_to_xkb_keyboard_layout rdp_keyboards[] = {
>>         {KBD_NORWEGIAN, "no", 0},
>>         {KBD_POLISH_PROGRAMMERS, "pl", 0},
>>         {KBD_POLISH_214, "pl", "qwertz"},
>> -       // {KBD_PORTUGUESE_BRAZILIAN_ABN0416, 0},
>> +       /* {KBD_PORTUGUESE_BRAZILIAN_ABN0416, 0}, */
>>         {KBD_ROMANIAN, "ro", 0},
>>         {KBD_RUSSIAN, "ru", 0},
>>         {KBD_RUSSIAN_TYPEWRITER, "ru", "typewriter"},
>> diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
>> index 9398d24..a3f1954 100644
>> --- a/xwayland/window-manager.c
>> +++ b/xwayland/window-manager.c
>> @@ -1715,7 +1715,7 @@ weston_wm_destroy_cursors(struct weston_wm *wm)
>>  static int
>>  get_cursor_for_location(enum theme_location location)
>>  {
>> -       // int location = theme_get_location(t, x, y, width, height, 0);
>> +       /* int location = theme_get_location(t, x, y, width, height, 0); */
>>
>>         switch (location) {
>>                 case THEME_LOCATION_RESIZING_TOP;

Chris, these two hunks can just go entirely. No point keeping
commented-out code: if we ever need to resurrect it at some point,
well, Git has history ...

> C++ style comments are part of C since 1999. I don't see why we shoudn't use
> them, since they are much easier to use for single line comments.

Lots of things are part of C that we don't use. :) It's a style thing,
for consistency.

Cheers,
Daniel


More information about the wayland-devel mailing list