Author: silene
Date: Sat Apr 4 21:13:04 2009
New Revision: 34492
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34492&view=rev
Log:
A few comments.
Modified:
trunk/src/config.hpp
Modified: trunk/src/config.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config.hpp?rev=34492&r1=34491&r2=34492&view=diff
==============================================================================
--- trunk/src/config.hpp (original)
+++ trunk/src/config.hpp Sat Apr 4 21:13:04 2009
@@ -69,7 +69,12 @@
*/
void check_valid(const config &cfg) const;
- struct safe_bool_impl { void nonnull() {}; };
+ struct safe_bool_impl { void nonnull() {} };
+ /**
+ * Used as the return type of the conversion operator for boolean
contexts.
+ * Needed, since the compiler would otherwise consider the following
+ * conversion (C legacy): cfg["abc"] -> "abc"[bool(cfg)] -> 'b'
+ */
typedef void (safe_bool_impl::*safe_bool)();
public:
@@ -78,8 +83,11 @@
config(const config& cfg);
- // Create a config with an empty child of name 'child'.
- config(const std::string& child);
+ /**
+ * Creates a config object with an empty child of name @a child.
+ */
+ explicit config(const std::string &child);
+
~config();
config& operator=(const config& cfg);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits