[haiku-commits] Re: haiku: hrev50832 - in src/system/boot: platform/efi loader

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 7 Jan 2017 22:09:34 +0100

Hi Jessica,

just pointing out some style issues:

Am 07/01/2017 um 09:35 schrieb jessica.l.hamilton@xxxxxxxxx:

 void
 platform_add_menus(Menu *menu)
 {
-       // No platform specific menus
+       MenuItem *item;
+
+       switch (menu->Type()) {
+               case MAIN_MENU:
+                       item = new(std::nothrow)MenuItem("Select video mode", 
video_mode_menu());

Space between ')' and MenuItem.
Also, since "item" is only used in that context, it should move there.

 static EFI_GUID sGraphicsOutputGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
 static EFI_GRAPHICS_OUTPUT_PROTOCOL *sGraphicsOutput;

'*' should go to the type, not the name.

+static int
+compare_video_modes(video_mode *a, video_mode *b)

Same here (and many other places that follow).

+static void
+add_video_mode(video_mode *videoMode)
+{
+       video_mode *mode = NULL;
+       while ((mode = (video_mode*)list_get_next_item(&sModeList, mode))

And here, too -- the asterisk style used for the cast is different than what you're using elsewhere; while the "type *" style is allowed, you must then be consistent, and use (type *), too.

Bye,
   Axel.

Other related posts: