ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.Logging/logger.cs
(Generate patch)

Comparing trunk/RomCheater.Logging/logger.cs (file contents):
Revision 264 by william, Mon May 28 07:22:19 2012 UTC vs.
Revision 265 by william, Sun Jun 3 19:47:47 2012 UTC

--- trunk/RomCheater.Logging/logger.cs	2012/06/03 19:38:30	264
+++ trunk/RomCheater.Logging/logger.cs	2012/06/03 19:47:47	265
@@ -59,7 +59,7 @@ namespace RomCheater.Logging
         #region implicit operators
         public static implicit operator loggerflagsbase<TValue>(EnumNameValuePair<TValue> t) { return new loggerflagsbase<TValue>(t); }
         public static implicit operator EnumNameValuePair<TValue>(loggerflagsbase<TValue> t) { return new loggerflagsbase<TValue>(t); }
-        public static implicit operator loggerflagsbase<TValue>(TValue t) 
+        public static implicit operator loggerflagsbase<TValue>(TValue t)
         {
             foreach (KeyValuePair<TValue, EnumNameValuePair<TValue>> pair in value_pairs) { EnumNameValuePair<TValue> l = pair.Value; if (l.Value.Equals(t)) { return new loggerflagsbase<TValue>(l); } }
             return loggerflagsbase<TValue>.NONE;
@@ -122,12 +122,11 @@ namespace RomCheater.Logging
     public class loggerflags : loggerflagsbase<ushort>
     {
           protected loggerflags() :base()        {        }
-        //protected loggerflags(ushort t) : this() { CurrentValue = new EnumNameValuePair< ushort>("", t); }
           protected loggerflags(EnumNameValuePair<ushort> t) : base(t) { }
           protected loggerflags(loggerflagsbase<ushort> t) : base(t) { }
         #region implicit operators
           public static implicit operator loggerflags(EnumNameValuePair<ushort> t) { return new loggerflags(t); }
-          public static implicit operator EnumNameValuePair<ushort>(loggerflags t) { return new loggerflags(t.Value); }
+          public static implicit operator EnumNameValuePair<ushort>(loggerflags t) { return new EnumNameValuePair<ushort>(t.Name,t.Value); }
           public static implicit operator ushort(loggerflags t) { return t.Value; }
           public static implicit operator loggerflags(ushort t) { return new loggerflags(t); }
           public static implicit operator string(loggerflags t) { return t.Name; }