C++ コーディングスタンダードで、

int n;
if (cond) n = X;
else n = Y;

みたいにするなら、

int n = cond ? X : Y;

のほうがいいって書いてあったよな。