Avoid allocating new empty arrays, reuse existing empty array
This commit is contained in:
committed by
Sebastiaan Janssen
parent
4239f0fc06
commit
822c8374ef
@@ -53,8 +53,8 @@ public class User : EntityBase, IUser, IProfile
|
||||
_language = globalSettings.DefaultUILanguage;
|
||||
_isApproved = true;
|
||||
_isLockedOut = false;
|
||||
_startContentIds = new int[] { };
|
||||
_startMediaIds = new int[] { };
|
||||
_startContentIds = [];
|
||||
_startMediaIds = [];
|
||||
|
||||
// cannot be null
|
||||
_rawPasswordValue = string.Empty;
|
||||
@@ -101,8 +101,8 @@ public class User : EntityBase, IUser, IProfile
|
||||
_userGroups = new HashSet<IReadOnlyUserGroup>();
|
||||
_isApproved = true;
|
||||
_isLockedOut = false;
|
||||
_startContentIds = new int[] { };
|
||||
_startMediaIds = new int[] { };
|
||||
_startContentIds = [];
|
||||
_startMediaIds = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user