feat: explicit null checks

This commit is contained in:
mob-sakai
2026-03-24 17:32:31 +09:00
parent 04c1ca72cd
commit 319ab5fe06
15 changed files with 98 additions and 80 deletions

View File

@@ -32,10 +32,10 @@ namespace Coffee.UIParticleInternal
/// </summary>
public static Texture2D GetActualTexture(this Sprite self)
{
if (!self) return null;
if (self == null) return null;
var ret = s_GetActiveAtlasTextureMethod(self);
return ret ? ret : self.texture;
return ret != null ? ret : self.texture;
}
/// <summary>
@@ -43,7 +43,7 @@ namespace Coffee.UIParticleInternal
/// </summary>
public static SpriteAtlas GetActiveAtlas(this Sprite self)
{
if (!self) return null;
if (self == null) return null;
return s_GetActiveAtlasMethod(self);
}
@@ -53,7 +53,7 @@ namespace Coffee.UIParticleInternal
/// </summary>
internal static Texture2D GetActualTexture(this Sprite self)
{
return self ? self.texture : null;
return self != null ? self.texture : null;
}
#endif
}