Follow-up Comment #11, patch #797 (project wesnoth):
Thank you for the patience correcting the patch.
1) always make your patch against the current svn trunk, not an older
version
I did it against the last version available for download on wesnoth site. I
thought current svn was available only for "official" wesnoth developers, but
from now on I'll work on the up to date svn tree.
2) why did you set music_start_time to SDL_GetTicks with fadeout of 0 then
you followed that with an else clause that cannot be reached, however will
immediately prove true next time the function is called (in a matter of
milliseconds)?
the else will, but the if "(SDL_GetTicks() >=
(music_start_time-fadingout_time))" not, it will only be true at the end of
music, or at least it was what I thought. But if you say it's wrong I will
check it better.
3) don't write else { if { } } when you could just write else if { }
ok
4) why did you subtract an unknown amount from an unsigned so that it could
become negative and roll over, then used a greater than / less than
comparison?
I did not notice it was unsigned, sorry.
5) don't mix tabs with spaces or ignore other style conventions
I tried to follow conventions listed on wesnoth site, sorry for what I
missed.
6) don't add extra information to the header file unless it should be
referenced from another translation unit
I like o put all the functions prototypes in the header file to help
documentation and understanding. But if you say it's not wesnoth convention
or it's a bad prectice, then ok.
I'm new to the code and that was my first attempting at wesnoth code and I
did almost every thing by guessing, so I would not be surprised if it was
rejected. Thank you very much all the corrections and for the feedback.
Manuel
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?797>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs