wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src theme.cpp


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src theme.cpp
Date: Mon, 27 Dec 2004 16:14:36 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    04/12/27 21:03:19

Modified files:
        src            : theme.cpp 

Log message:
        added support for [add]ing blocks in [partialresolution]

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/theme.cpp.diff?tr1=1.27&tr2=1.28&r1=text&r2=text

Patches:
Index: wesnoth/src/theme.cpp
diff -u wesnoth/src/theme.cpp:1.27 wesnoth/src/theme.cpp:1.28
--- wesnoth/src/theme.cpp:1.27  Thu Dec 16 01:03:29 2004
+++ wesnoth/src/theme.cpp       Mon Dec 27 21:03:18 2004
@@ -159,7 +159,7 @@
                        for(config::child_list::const_iterator i = c.begin(); i 
!= c.end(); ++i) {
                                const config* parent;
                                find_ref ((**i)["id"], *outcfg,
-                                         true /* remove found child*/);
+                                         true /* remove found child */);
                        }
                }
                {
@@ -172,6 +172,19 @@
                                }
                        }
                }
+               {
+                       // cannot add [status] sub-elements, but who cares
+                       const config* c = cfg.child("add");
+                       if (c != NULL) {
+                               const config::child_map m = c->all_children();
+                               for(config::child_map::const_iterator j = 
m.begin(); j != m.end(); ++j) {
+                                       for(config::child_list::const_iterator 
i = j->second.begin();
+                                           i != j->second.end(); ++i) {
+                                               outcfg->add_child(j->first, 
**i);
+                                       }
+                               }
+                       }
+               }
 
                return outcfg;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]