]> granicus.if.org Git - nethack/commitdiff
maybe_finished_meal() comment bit
authorPatR <rankin@nethack.org>
Wed, 25 May 2022 19:20:48 +0000 (12:20 -0700)
committerPatR <rankin@nethack.org>
Wed, 25 May 2022 19:20:48 +0000 (12:20 -0700)
An end of line comment that spans multiple lines needs to start the
continuation line(s) with '*' or clang-format will convert it into
a block comment that follows the initial line.

  foo(); /* call foo
            but not bar */
would become
  foo();
  /*
   * call foo but not bar
   */
however
  foo(); /* call foo
          * but not bar */
would stay as-is.

All that for a one-line change, and then I've changed this particular
instance to be
  /* call foo but not bar */
  foo();

There are lots of these that should eventually be fixed.  I just
happened to notice this one when looking for something else.

src/eat.c

index 1f7be157732d38801d626d2a91ba2605fe388892..9a1f15531c58dac9d8e2fdd2534730698cd76940 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1,4 +1,4 @@
-/* NetHack 3.7 eat.c   $NHDT-Date: 1648318981 2022/03/26 18:23:01 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.269 $ */
+/* NetHack 3.7 eat.c   $NHDT-Date: 1653506421 2022/05/25 19:20:21 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.278 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2012. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -3692,8 +3692,8 @@ maybe_finished_meal(boolean stopping)
         && g.context.victual.usedtime >= g.context.victual.reqtime) {
         if (stopping)
             g.occupation = 0; /* for do_reset_eat */
-        (void) eatfood();   /* calls done_eating() to use up
-                               g.context.victual.piece */
+        /* eatfood() calls done_eating() to use up g.context.victual.piece */
+        (void) eatfood();
         return TRUE;
     }
     return FALSE;