From 847a248a267d8e41c8c6b7e376a0267961b84aae Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 8 Jul 2011 21:52:33 +1200 Subject: [PATCH] bug #997 -- introduce generic version of FieldLoader.GetValue --- OpenRA.FileFormats/FieldLoader.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.FileFormats/FieldLoader.cs b/OpenRA.FileFormats/FieldLoader.cs index beb76fca6f..3c2c2a0742 100755 --- a/OpenRA.FileFormats/FieldLoader.cs +++ b/OpenRA.FileFormats/FieldLoader.cs @@ -90,6 +90,11 @@ namespace OpenRA.FileFormats UnknownFieldAction( key.Trim(), self.GetType() ); } + public static T GetValue( string field, string value ) + { + return (T) GetValue( field, typeof(T), value ); + } + public static object GetValue( string field, Type fieldType, string x ) { if (x != null) x = x.Trim();