diff options
author | jbevain <jbevain@gmail.com> | 2010-07-23 19:58:22 +0400 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2010-07-23 19:58:22 +0400 |
commit | aafba9ca73eef5ab427e514e32a24f49b63c6210 (patch) | |
tree | 78268b7ba5b770c293ecab0308652c6f943fb683 /Mono.Cecil/ParameterDefinition.cs | |
parent | c209ec004ffce7233601e176eed216234e5ed5c2 (diff) |
use null coalescing after all
Diffstat (limited to 'Mono.Cecil/ParameterDefinition.cs')
-rw-r--r-- | Mono.Cecil/ParameterDefinition.cs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Mono.Cecil/ParameterDefinition.cs b/Mono.Cecil/ParameterDefinition.cs index 976505d..edb3b31 100644 --- a/Mono.Cecil/ParameterDefinition.cs +++ b/Mono.Cecil/ParameterDefinition.cs @@ -81,12 +81,7 @@ namespace Mono.Cecil { } public Collection<CustomAttribute> CustomAttributes { - get { - if (custom_attributes != null) - return custom_attributes; - - return custom_attributes = this.GetCustomAttributes (parameter_type.Module); - } + get { return custom_attributes ?? (custom_attributes = this.GetCustomAttributes (parameter_type.Module)); } } public bool HasMarshalInfo { @@ -99,12 +94,7 @@ namespace Mono.Cecil { } public MarshalInfo MarshalInfo { - get { - if (marshal_info != null) - return marshal_info; - - return marshal_info = this.GetMarshalInfo (parameter_type.Module); - } + get { return marshal_info ?? (marshal_info = this.GetMarshalInfo (parameter_type.Module)); } set { marshal_info = value; } } |