Code quality fixes (NullReference checks, unused variables etc)

This commit is contained in:
RKrom 2014-04-26 00:34:06 +02:00
parent 6ab6033f85
commit ac08533727
99 changed files with 1252 additions and 1312 deletions

View file

@ -37,7 +37,7 @@ namespace Greenshot.Drawing.Fields {
return myValue;
}
set {
if (!object.Equals(myValue,value)) {
if (!Equals(myValue,value)) {
myValue = value;
if (PropertyChanged!=null) {
PropertyChanged(this, new PropertyChangedEventArgs("Value"));
@ -102,11 +102,11 @@ namespace Greenshot.Drawing.Fields {
if (other == null) {
return false;
}
return this.FieldType == other.FieldType && object.Equals(this.Scope, other.Scope);
return FieldType == other.FieldType && Equals(Scope, other.Scope);
}
public override string ToString() {
return string.Format("[Field FieldType={1} Value={0} Scope={2}]", this.myValue, this.FieldType, this.Scope);
return string.Format("[Field FieldType={1} Value={0} Scope={2}]", myValue, FieldType, Scope);
}
}
@ -122,7 +122,7 @@ namespace Greenshot.Drawing.Fields {
public class FieldChangedEventArgs : EventArgs {
public readonly Field Field;
public FieldChangedEventArgs(Field field) {
this.Field = field;
Field = field;
}
}
}