Author: mordante
Date: Fri May 22 12:15:56 2009
New Revision: 35814

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35814&view=rev
Log:
Move tconst_duplicator to another header.

I want to reuse this helper so moved it to the helper header. (Note
might move to another header later on.)

Modified:
    trunk/src/gui/widgets/grid_private.hpp
    trunk/src/gui/widgets/helper.hpp

Modified: trunk/src/gui/widgets/grid_private.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/grid_private.hpp?rev=35814&r1=35813&r2=35814&view=diff
==============================================================================
--- trunk/src/gui/widgets/grid_private.hpp (original)
+++ trunk/src/gui/widgets/grid_private.hpp Fri May 22 12:15:56 2009
@@ -35,27 +35,6 @@
 #include "foreach.hpp"
 
 namespace gui2 {
-
-/**
- * Helper struct to get the same constness for T and U.
- *
- * @param T                       A type to determine the constness.
- * @param U                       Non const type to set the constness off.
- */
-template<class T, class U>
-struct tconst_duplicator
-{
-       /** The type to use, if T not const U is also not const. */
-       typedef U type;
-};
-
-/** Specialialized version of tconst_duplicator when T is a const type. */
-template<class T, class U>
-struct tconst_duplicator<const T, U>
-{
-       /** The type to use, const U. */
-       typedef const U type;
-};
 
 /**
  * Helper to implement private functions without modifing the header.

Modified: trunk/src/gui/widgets/helper.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/helper.hpp?rev=35814&r1=35813&r2=35814&view=diff
==============================================================================
--- trunk/src/gui/widgets/helper.hpp (original)
+++ trunk/src/gui/widgets/helper.hpp Fri May 22 12:15:56 2009
@@ -167,6 +167,27 @@
  */
 game_logic::map_formula_callable get_screen_size_variables();
 
+/**
+ * Helper struct to get the same constness for T and U.
+ *
+ * @param T                       A type to determine the constness.
+ * @param U                       Non const type to set the constness off.
+ */
+template<class T, class U>
+struct tconst_duplicator
+{
+       /** The type to use, if T not const U is also not const. */
+       typedef U type;
+};
+
+/** Specialialized version of tconst_duplicator when T is a const type. */
+template<class T, class U>
+struct tconst_duplicator<const T, U>
+{
+       /** The type to use, const U. */
+       typedef const U type;
+};
+
 } // namespace gui2
 
 #endif


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

Reply via email to