Is there a reason to prefer one syntax over the other?
Code: Select all
bool can_attack{ObjectCanAttack(obj)};
if (can_attack) { ... }
DebugLogger(combat) << (can_attack ? "... can attack" : "");
Code: Select all
bool can_attack = ObjectCanAttack(obj);
if (can_attack) { ... }
DebugLogger(combat) << (can_attack ? "... can attack" : "");