refactor: use nullable annotations instead of CanBeNullAttribute

This commit is contained in:
goat 2021-08-22 23:06:46 +02:00
parent 3c5c7fbc80
commit 010a4972cd
No known key found for this signature in database
GPG key ID: F18F057873895461
14 changed files with 33 additions and 62 deletions

View file

@ -66,8 +66,7 @@ namespace Dalamud.Game.ClientState.Buddy
/// <summary>
/// Gets the active companion buddy.
/// </summary>
[CanBeNull]
public BuddyMember CompanionBuddy
public BuddyMember? CompanionBuddy
{
get
{
@ -79,8 +78,7 @@ namespace Dalamud.Game.ClientState.Buddy
/// <summary>
/// Gets the active pet buddy.
/// </summary>
[CanBeNull]
public BuddyMember PetBuddy
public BuddyMember? PetBuddy
{
get
{
@ -103,8 +101,7 @@ namespace Dalamud.Game.ClientState.Buddy
/// </summary>
/// <param name="index">Spawn index.</param>
/// <returns>A <see cref="BuddyMember"/> at the specified spawn index.</returns>
[CanBeNull]
public BuddyMember this[int index]
public BuddyMember? this[int index]
{
get
{
@ -149,8 +146,7 @@ namespace Dalamud.Game.ClientState.Buddy
/// </summary>
/// <param name="address">The address of the buddy in memory.</param>
/// <returns><see cref="BuddyMember"/> object containing the requested data.</returns>
[CanBeNull]
public BuddyMember CreateBuddyMemberReference(IntPtr address)
public BuddyMember? CreateBuddyMemberReference(IntPtr address)
{
var clientState = Service<ClientState>.Get();