emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview: portable dumper


From: Philippe Vaucher
Subject: Re: Preview: portable dumper
Date: Wed, 30 Nov 2016 09:26:34 +0100

As a matter of general taste, I _much_ prefer this style:

    #ifdef HAVE_FOO
        void foo_thing (void);
    #else
    # define foo_thing() ((void)0)
    #endif

        void
        function1()
        {
          ...
          foo_thing();
          ...
        }

to this style:

        void
        function1()
        {
          ...
    #ifdef HAVE_FOO
          foo_thing();
    #endif
          ...
        }

        void function2()
        {
          ...
    #ifdef HAVE_FOO
          foo_thing();
    #endif
          ...
        }


+1

ifdefs should be as much out of the way of the code as possible in my honest opinion. 

Philippe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]