diff options
author | jbevain <jbevain@gmail.com> | 2011-02-22 15:30:39 +0300 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-02-22 15:30:39 +0300 |
commit | 5164e79b52da8f66d6131af64d183d45cac6257d (patch) | |
tree | 853a7384a8390f1e8047b7294702e6a615b0a07a /Mono.Cecil | |
parent | 4dfc5b82e99d27d8e6c861db65b7d21b8bd2a723 (diff) |
Prefer ?? operators
Diffstat (limited to 'Mono.Cecil')
-rw-r--r-- | Mono.Cecil/GenericInstanceMethod.cs | 7 | ||||
-rw-r--r-- | Mono.Cecil/GenericInstanceType.cs | 7 |
2 files changed, 2 insertions, 12 deletions
diff --git a/Mono.Cecil/GenericInstanceMethod.cs b/Mono.Cecil/GenericInstanceMethod.cs index d5d8d4e..ce41150 100644 --- a/Mono.Cecil/GenericInstanceMethod.cs +++ b/Mono.Cecil/GenericInstanceMethod.cs @@ -42,12 +42,7 @@ namespace Mono.Cecil { } public Collection<TypeReference> GenericArguments { - get { - if (arguments == null) - arguments = new Collection<TypeReference> (); - - return arguments; - } + get { return arguments ?? (arguments = new Collection<TypeReference> ()); } } public override bool IsGenericInstance { diff --git a/Mono.Cecil/GenericInstanceType.cs b/Mono.Cecil/GenericInstanceType.cs index 46c048b..be231ae 100644 --- a/Mono.Cecil/GenericInstanceType.cs +++ b/Mono.Cecil/GenericInstanceType.cs @@ -44,12 +44,7 @@ namespace Mono.Cecil { } public Collection<TypeReference> GenericArguments { - get { - if (arguments == null) - arguments = new Collection<TypeReference> (); - - return arguments; - } + get { return arguments ?? (arguments = new Collection<TypeReference> ()); } } public override TypeReference DeclaringType { |