[Dune-devel] [Dune-Commit] [Commit] dune-common - e5ca9a3: [release] Removes unused parameter warnings with -Wall -Wextra

Christoph Grüninger christoph.grueninger at iws.uni-stuttgart.de
Mon Dec 16 11:50:16 CET 2013


Hi Markus,
maybe it is worth having a look at Q_UNUSED:
  #define Q_UNUSED(x) (void)x;
We could have something similar, like DUNE_UNUSED_PARAMETER.

According to a KDE [1] this does make both the compiler and Doxygen
happy. Here is an example:

virtual void setTimeout(uint timeout, bool repeat)
{
  Q_UNUSED(timeout);
  Q_UNUSED(repeat);
}

This gives the reader a chance to get the reason of the commands.
Instead of missing parameter names and weired void casts that'll fail
for nullpointers.

Bye
Christoph

[1] http://techbase.kde.org/Policies/Library_Documentation_Policy

-- 
Une science n'était vraiment développée que quand elle
pouvait utiliser les mathématiques.    (Paul Lafargue)
*********************************************
CMWR 2014: 10th - 13th June 2014 in Stuttgart
         Please visit www.cmwr14.de
*********************************************




More information about the Dune-devel mailing list