More concise way to write the following statement
<p>Is there a more concise way to write the following C++ statements:</p>

<pre><code>int max = 0;

int u = up();
if(u &gt; max)
{
 max = u;
}

int d = down();
if(d &gt; max)
{
max = d;
}

int r = right();
max = r &gt; max ? r : max;  
</code></pre>

<p>Specifically is there a way to embed the assignment of the functions return inside the if statement/ternary operator?</p>
