[Dune] [#951] Fix warning: unused parameter

Dune flyspray at dune-project.org
Thu Sep 15 15:43:35 CEST 2011


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#951 - Fix warning: unused parameter
User who did this - Elias Pipping (pipping)

----------
Then a function like the following

virtual void foo(int i, double x, double y, Interval<double>& d, int j) const
{
    bar(i, d, j);
    return;
}

would turn into...

With (1):

virtual void foo(int i, double x, double y, Interval<double>& d, int j) const
{
    (void)x;
    (void)y;
    bar(i, d, j);
    return;
}

or with a #define:

virtual void foo(int i, double x, double y, Interval<double>& d, int j) const
{
    UNUSED_ARGUMENT(x);
    UNUSED_ARGUMENT(y);
    bar(i, d, j);
    return;
}

And with (2):

virtual void foo(int i, double UNUSED_ARG(x), double UNUSED_ARG(y), Interval<double>& d, int j) const
{
    bar(i, d, j);
    return;
}

Is that really desirable?

The last version adds the least amount of noise imho.
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=951#comment2688

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list