Cycles: Fix NULL instead of false
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 4 May 2019 16:49:37 +0000 (18:49 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 4 May 2019 16:49:37 +0000 (18:49 +0200)
Not really noticeable for users, since the compiled code is the same,
but semantically this is incorrect.

intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/render/image.h

index 0257f569f4a96e3bde0ea8a81efdb742317913cb..8215f6522dbdc52914e5fba9ab5aaf298003c4ce 100644 (file)
@@ -1313,7 +1313,7 @@ bool OSLRenderServices::get_texture_info(OSL::ShaderGlobals *sg,
 
   /* No texture info for other texture types. */
   if (handle && handle->type != OSLTextureHandle::OIIO) {
-    return NULL;
+    return false;
   }
 
   /* Get texture info from OpenImageIO. */
index c05a65f6c3e4c12138bc0f197dd5934a6b4ad162..e8ed657ee10a89c68a7c438bfca2bc7e91951afc 100644 (file)
@@ -56,7 +56,7 @@ class ImageMetaData {
         width(0),
         height(0),
         depth(0),
-        builtin_free_cache(NULL),
+        builtin_free_cache(false),
         type((ImageDataType)0),
         colorspace(u_colorspace_raw),
         compress_as_srgb(false)