Removes some unnecessary ternary conditionals
authorJohn Baxter <automata@unm.edu>
Thu, 22 Jan 2015 21:33:45 +0000 (14:33 -0700)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 29 Jan 2015 00:39:09 +0000 (01:39 +0100)
commit9c2250d8bd991e06ee7a7f6467340f7120e307db
tree86f64ffe16dcdd2aa785b4eaf5272cf80745cdb1
parent4c5c666f9849ab01ca50459185edf3d530b61fb2
Removes some unnecessary ternary conditionals

In .../src/gromacs/mdlib/minimize.cpp calls to
the evaluate_energy() function.

Details:

The gmx_global_stat_t type argument in calls to
evaluate_energy() use this ternary expression:

evaluate_energy(..., gstat ? gstat : NULL, ...);

However, .../src/gromacs/legacyheaders/sim_util.h
shows gmx_global_stat_t is a typedef equivalent
to struct gmx_global_stat*, a pointer type; since
a pointer is TRUE if and only if it is not NULL,
the following is equivalent:

evaluate_energy(..., gstat, ...);

This patch performs this substitution.

Change-Id: I5bfc50dd8927fe1e797e06144535f61731fb7eb1
src/gromacs/mdlib/minimize.cpp