-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReportItem.cs
44 lines (37 loc) · 1.21 KB
/
ReportItem.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// This file is part of bugreport.
// Copyright (c) 2006-2009 The bugreport Developers.
// See AUTHORS.txt for details.
// Licensed under the GNU General Public License, Version 3 (GPLv3).
// See LICENSE.txt for details.
using System;
namespace bugreport
{
public struct ReportItem
{
public readonly UInt32 InstructionPointer;
public readonly Boolean IsTainted;
public ReportItem(UInt32 instructionPointer, Boolean isTainted)
{
InstructionPointer = instructionPointer;
IsTainted = isTainted;
}
public static Boolean operator ==(ReportItem a, ReportItem b)
{
return a.Equals(b);
}
public static Boolean operator !=(ReportItem a, ReportItem b)
{
return !a.Equals(b);
}
public override Boolean Equals(object obj)
{
var report = (ReportItem)obj;
return InstructionPointer == report.InstructionPointer &&
IsTainted == report.IsTainted;
}
public override Int32 GetHashCode()
{
return InstructionPointer.GetHashCode() ^ IsTainted.GetHashCode();
}
}
}