Gibbed.RED.FileFormats.Script.FunctionDefinition.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            var rhs = obj as FunctionDefinition;
            if (rhs == null) return false;
            if (Instructions == null)
            {
                return rhs.Instructions == null;
            }
            if (rhs.Instructions == null)
            {
                return false;
            }
            if (Instructions.Count != rhs.Instructions.Count)
            {
                return false;
            }
            return !Instructions.Where((t, i) => t.Opcode != rhs.Instructions[i].Opcode).Any();
            // TODO check operands
        }