Fixes implicit ternary expressions
This commit is contained in:
parent
c85b0a740c
commit
ff26dfa375
345 changed files with 1905 additions and 2336 deletions
|
|
@ -97,7 +97,7 @@ namespace Server {
|
|||
|
||||
private void Replace<T>( ref List<T> list, T oldValue, T newValue ) {
|
||||
if ( oldValue != null && newValue != null ) {
|
||||
int index = ( list != null ? list.IndexOf( oldValue ) : -1 );
|
||||
int index = list?.IndexOf( oldValue ) ?? -1;
|
||||
|
||||
if ( index >= 0 ) {
|
||||
list[index] = newValue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue