/[RomCheater]/trunk/RomCheater.Logging/EnumNameValuePair.cs
ViewVC logotype

Diff of /trunk/RomCheater.Logging/EnumNameValuePair.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.Logging/EnumNameValuePair.cs	2012/05/10 15:30:14	115
+++ trunk/RomCheater.Logging/EnumNameValuePair.cs	2012/06/03 20:40:36	269
@@ -14,13 +14,13 @@
         public static implicit operator string(EnumNameValuePair<TValue> o) { return o.Name; }
         public static TValue operator |(EnumNameValuePair<TValue> x, EnumNameValuePair<TValue> y) { return bitwise_or(x, y); }
         public static TValue operator &(EnumNameValuePair<TValue> x, EnumNameValuePair<TValue> y) { return bitwise_and(x, y); }
-        public static bool operator ==(EnumNameValuePair<TValue> x, EnumNameValuePair<TValue> y) { return x == y; }
-        public static bool operator !=(EnumNameValuePair<TValue> x, EnumNameValuePair<TValue> y) { return x != y; }
+        public static bool operator ==(EnumNameValuePair<TValue> x, EnumNameValuePair<TValue> y) { return x.Value.Equals(y.Value); }
+        public static bool operator !=(EnumNameValuePair<TValue> x, EnumNameValuePair<TValue> y) { return !x.Value.Equals(y.Value); }
         public override bool Equals(object obj)
         {
             EnumNameValuePair<TValue> t = (obj as EnumNameValuePair<TValue>);
             if (t == null) return false;
-            return this.Equals(t);
+           return this.Value.Equals(t.Value);
         }
         public override int GetHashCode()
         {
@@ -161,7 +161,7 @@
         {
             return bitwise_or(new EnumNameValuePair<TValue>("",x), new EnumNameValuePair<TValue>("",y));
         }
-        internal static TValue bitwise_or(params EnumNameValuePair<TValue>[] values)
+        public static TValue bitwise_or(params EnumNameValuePair<TValue>[] values)
         {
             if (!(values.Length > 1 )) { throw new InvalidOperationException("bitwise_or must have at least two operands"); }
             TValue value = default(TValue);
@@ -173,7 +173,7 @@
         {
             return bitwise_and(new EnumNameValuePair<TValue>("", x), new EnumNameValuePair<TValue>("", y));
         }
-        internal static TValue bitwise_and(params EnumNameValuePair<TValue>[] values)
+        public static TValue bitwise_and(params EnumNameValuePair<TValue>[] values)
         {
             if (!(values.Length > 1)) { throw new InvalidOperationException("bitwise_and must have at least two operands"); }
             TValue value = default(TValue);

 

  ViewVC Help
Powered by ViewVC 1.1.22