From 3970635e875275cbfe6d432a2f4255dc3618f846 Mon Sep 17 00:00:00 2001 From: Cao Doan Date: Fri, 28 Jul 2023 14:45:06 -0700 Subject: [PATCH] Fix nullable-to-nonnull-conversion warnings Summary: Cleaning up some build warnings when Wnullable-to-nonnull-conversion is enabled. Changelog: Fixes nullability warnings from `Texture.h`. Differential Revision: D47886354 fbshipit-source-id: 6c7d9c42b27d6af57c7faf962e157dd4480ffc14 --- src/igl/metal/Texture.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/igl/metal/Texture.h b/src/igl/metal/Texture.h index 94152caeeb..3efc7903ea 100644 --- a/src/igl/metal/Texture.h +++ b/src/igl/metal/Texture.h @@ -51,10 +51,10 @@ class Texture final : public ITexture { bool isRequiredGenerateMipmap() const override; uint64_t getTextureId() const override; - IGL_INLINE id get() const { + IGL_INLINE id _Nullable get() const { return (drawable_) ? drawable_.texture : value_; } - IGL_INLINE id getDrawable() const { + IGL_INLINE id _Nullable getDrawable() const { return drawable_; }