From c5bd71b375c6393fcd3d8ccbdfa3099aaf302f75 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 11 Aug 2023 14:55:40 +0200 Subject: [PATCH] Fix compiler warning about undefined OSL_LIBRARY_VERSION_CODE Pull Request: https://projects.blender.org/blender/blender/pulls/111048 --- intern/cycles/kernel/osl/types.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/intern/cycles/kernel/osl/types.h b/intern/cycles/kernel/osl/types.h index 9a85a24e6ce..07b8b0cff82 100644 --- a/intern/cycles/kernel/osl/types.h +++ b/intern/cycles/kernel/osl/types.h @@ -4,15 +4,17 @@ #pragma once +#if !defined(__KERNEL_GPU__) +# include +#endif + CCL_NAMESPACE_BEGIN #if defined(__KERNEL_GPU__) /* Strings are represented by their hashes on the GPU. */ typedef size_t DeviceString; -#elif defined(OPENIMAGEIO_USTRING_H) -typedef ustring DeviceString; #else -typedef const char *DeviceString; +typedef OSL::ustring DeviceString; #endif ccl_device_inline DeviceString make_string(const char *str, size_t hash) @@ -20,12 +22,9 @@ ccl_device_inline DeviceString make_string(const char *str, size_t hash) #if defined(__KERNEL_GPU__) (void)str; return hash; -#elif defined(OPENIMAGEIO_USTRING_H) - (void)hash; - return ustring(str); #else (void)hash; - return str; + return OSL::ustring(str); #endif }