Merge pull request #848 from Bond-009/perf

Minor changes to reduce allocations
This commit is contained in:
Joshua M. Boniface
2019-02-19 21:24:51 -05:00
committed by GitHub
21 changed files with 303 additions and 304 deletions

View File

@@ -168,9 +168,9 @@ namespace Emby.Server.Implementations.Library
/// <exception cref="ArgumentNullException"></exception>
public User GetUserById(Guid id)
{
if (id.Equals(Guid.Empty))
if (id == Guid.Empty)
{
throw new ArgumentNullException(nameof(id));
throw new ArgumentException(nameof(id), "Guid can't be empty");
}
return Users.FirstOrDefault(u => u.Id == id);