mail[Wesnoth-commits] r40337 - /trunk/src/unit_types.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on December 22, 2009 - 17:24:
Author: silene
Date: Tue Dec 22 17:24:54 2009
New Revision: 40337

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40337&view=rev
Log:
Initialized with dummy race earlier.

Modified:
    trunk/src/unit_types.cpp

Modified: trunk/src/unit_types.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=40337&r1=40336&r2=40337&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Tue Dec 22 17:24:54 2009
@@ -541,6 +541,8 @@
        return res;
 }
 
+static const unit_race dummy_race;
+
 #ifdef _MSC_VER
 #pragma warning(push)
 //silence "elements of array will be default initialized" warnings
@@ -565,7 +567,7 @@
        num_traits_(0),
        gender_types_(),
        variations_(),
-       race_(NULL),
+       race_(&dummy_race),
        alpha_(),
        abilities_(),
        adv_abilities_(),
@@ -654,7 +656,7 @@
        num_traits_(0),
        gender_types_(),
        variations_(),
-       race_(NULL),
+       race_(&dummy_race),
        alpha_(),
        abilities_(),
        adv_abilities_(),
@@ -747,9 +749,6 @@
                                        possibleTraits_.add_child("trait", t);
                        }
                }
-       } else {
-               static const unit_race dummy_race;
-               race_ = &dummy_race;
        }
 
        // Insert any traits that are just for this unit type




Related Messages


Powered by MHonArc, Updated Tue Dec 22 17:40:11 2009