Follow-up Comment #4, patch #1608 (project wesnoth):
ok, some simple code related questions
if((*u).has_attribute("include_recall")){
recall_arg_included=true;
if(utils::string_bool((*u)["include_recall"]))
recall=NULL; //if include_recall is
set to false do not call recall list
has no buisness
}
why do you do such a complicate logic, wouldn't the simpler
if(utils::string_bool((*u)["include_recall"])) {
recall_arg_included=true;
}
correctly test everything, since a non existing attribute returns a null
string, and we don't need to change the parameter recall within the code (we
will still test that recall is non-null later, obviously)
if(i.hitpoints() > 0 && unit_matches_filter(i, *u)) {
why do you test if hp>0 ? can such a thing happen in the recall list ? if
yes, why ?
note that I will be away for some time, if you're in a hurry you might want
to find another reviewer. If not, i'll review it when I come back
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1608>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs