mirror of
https://github.com/greenshot/greenshot
synced 2025-07-30 11:40:40 -07:00
Code quality fixes (NullReference checks, unused variables etc)
This commit is contained in:
parent
6ab6033f85
commit
ac08533727
99 changed files with 1252 additions and 1312 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue