changeset 13:ad8eaed12e66

Re #9 - Load in smaller methods * Fix earlier commit that caused exceptions about already being in dictionary for first object by caching before adding
author IBBoard <dev@ibboard.co.uk>
date Thu, 22 Jan 2009 20:26:08 +0000
parents ac232763858b
children 0770e5cbba7c
files api/Objects/Race.cs
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/api/Objects/Race.cs	Sun Jan 18 20:52:29 2009 +0000
+++ b/api/Objects/Race.cs	Thu Jan 22 20:26:08 2009 +0000
@@ -166,8 +166,8 @@
 
 		public void AddUnitType(UnitType type)
 		{
+			CacheUnitType(type);
 			unitTypes.Add(type.ID, type);
-			CacheUnitType(type);
 		}
 
 		[Obsolete("Use AddUnitType method instead")]