I want to write some code with the following logic. From a clarity and conciseness point of view, is the first approach better than the other two?
if(kErrNone != (cs_error = get_last_error(component)))
{
/* Do something. */
}
if((cs_error = get_last_error(component)) != kErrNone)
{
/* Do something. */
}
cs_error = get_last_error(component);
if(cs_error != kErrNone)
{
/* Do something. */
}