Author: hajo
Date: Wed Aug 22 00:42:23 2007
New Revision: 19709

URL: http://svn.gna.org/viewcvs/wesnoth?rev=19709&view=rev
Log:
doxygen, comments

Modified:
    trunk/doc/doxygen/doxygen.cpp
    trunk/src/util.cpp
    trunk/src/util.hpp

Modified: trunk/doc/doxygen/doxygen.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/doc/doxygen/doxygen.cpp?rev=19709&r1=19708&r2=19709&view=diff
==============================================================================
--- trunk/doc/doxygen/doxygen.cpp (original)
+++ trunk/doc/doxygen/doxygen.cpp Wed Aug 22 00:42:23 2007
@@ -416,7 +416,7 @@
 
 /**    -file actions.hpp */
 /**    -file ai_attack.hpp */
-/**    @file ai.hpp */
+/**    -file ai.hpp */
 /**    -file ai_move.hpp */
 /**    -file config.hpp */
 /**    @file display.hpp */
@@ -444,7 +444,7 @@
 /**    -file theme.hpp */
 /**    -file unit.hpp */
 /**    @file unit_types.hpp */
-/**    @file util.hpp */
+/**    -file util.hpp */
 /**    @file video.hpp */
 
 /** @} */

Modified: trunk/src/util.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/util.cpp?rev=19709&r1=19708&r2=19709&view=diff
==============================================================================
--- trunk/src/util.cpp (original)
+++ trunk/src/util.cpp Wed Aug 22 00:42:23 2007
@@ -11,6 +11,9 @@
 
    See the COPYING file for more details.
 */
+
+//! @file util.cpp 
+//! String-routines - Templates for lexical_cast & lexical_cast_default.
 
 #include "util.hpp"
 #include <cstdlib>

Modified: trunk/src/util.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/util.hpp?rev=19709&r1=19708&r2=19709&view=diff
==============================================================================
--- trunk/src/util.hpp (original)
+++ trunk/src/util.hpp Wed Aug 22 00:42:23 2007
@@ -11,6 +11,10 @@
 
    See the COPYING file for more details.
 */
+
+//! @file util.hpp 
+//! Templates and utility-routines for strings and numbers.
+
 #ifndef UTIL_H_INCLUDED
 #define UTIL_H_INCLUDED
 
@@ -18,8 +22,9 @@
 #include <map>
 #include <sstream>
 
-//instead of playing with VC++'s crazy definitions of min and max,
-//just define our own
+// instead of playing with VC++'s crazy definitions of min and max,
+// just define our own
+//! Replacement for VC++'s definitions of min and max.
 template<typename T>
 inline T& minimum(T& a, T& b) { return a < b ? a : b; }
 
@@ -41,13 +46,13 @@
 template<typename T>
 inline bool is_even(T num) { return !is_odd(num); }
 
-// guarantees portable results for division by 100; round towards 0
+//! Guarantees portable results for division by 100; round towards 0
 inline int div100rounded(int num) {
        return (num < 0) ? -(((-num) + 49) / 100) : (num + 49) / 100;
 }
 
-// round (base_damage * bonus / divisor) to the closest integer
-// but up or down towards base_damage
+//! round (base_damage * bonus / divisor) to the closest integer,
+//! but up or down towards base_damage
 inline int round_damage(int base_damage, int bonus, int divisor) {
        const int rounding = divisor / 2 - (bonus < divisor ? 0 : 1);
        return maximum<int>(1, (base_damage * bonus + rounding) / divisor);
@@ -130,8 +135,8 @@
 inline bool chars_equal_insensitive(char a, char b) { return tolower(a) == 
tolower(b); }
 inline bool chars_less_insensitive(char a, char b) { return tolower(a) < 
tolower(b); }
 
-//a definition of 'push_back' for strings, since some implementations
-//don't support string::push_back
+//! A definition of 'push_back' for strings, 
+// since some implementations don't support string::push_back
 template<typename T, typename C>
 void push_back(T& str, C c)
 {
@@ -145,16 +150,16 @@
 # define fxp_shift 8
 # define fxp_base (1 << fxp_shift)
 
-// IN: float or int - OUT: fixed_t
+//! IN: float or int - OUT: fixed_t
 # define ftofxp(x) (fixed_t((x) * fxp_base))
 
-// IN: unsigned and fixed_t - OUT: unsigned
+//! IN: unsigned and fixed_t - OUT: unsigned
 # define fxpmult(x,y) (((x)*(y)) >> fxp_shift)
 
-// IN: unsigned and int - OUT: fixed_t
+//! IN: unsigned and int - OUT: fixed_t
 # define fxpdiv(x,y) (((x) << fxp_shift) / (y))
 
-// IN: fixed_t - OUT: int
+//! IN: fixed_t - OUT: int
 # define fxptoi(x) ( ((x)>0) ? ((x) >> fxp_shift) : (-((-(x)) >> fxp_shift)) )
 
 #else


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to