| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | $NetBSD: patch-src_core_OCIOYaml.cpp,v 1.1 2019/09/18 22:30:49 nia Exp $ | | 1 | $NetBSD: patch-src_core_OCIOYaml.cpp,v 1.2 2021/09/10 12:21:57 nia Exp $ |
2 | | | 2 | |
3 | Description: Fix build with yaml-cpp 0.6 | | 3 | Description: Fix build with yaml-cpp 0.6 |
4 | One of the changes in yaml-cpp 0.6 was the replacement of some inline | | 4 | One of the changes in yaml-cpp 0.6 was the replacement of some inline |
5 | virtual functions with out-of-line virtual functions, to ensure a | | 5 | virtual functions with out-of-line virtual functions, to ensure a |
6 | single definition of the relevant vtable. | | 6 | single definition of the relevant vtable. |
7 | . | | 7 | . |
8 | Unfortunately, OpenColorIO forward-declares these classes with a different | | 8 | Unfortunately, OpenColorIO forward-declares these classes with a different |
9 | GCC visibility attribute. Now that the key function for the vtables is | | 9 | GCC visibility attribute. Now that the key function for the vtables is |
10 | not inlined into code using yaml-cpp.h that breaks link-time resolution of | | 10 | not inlined into code using yaml-cpp.h that breaks link-time resolution of |
11 | the vtables. | | 11 | the vtables. |
12 | Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> | | 12 | Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> |
13 | Bug: https://github.com/imageworks/OpenColorIO/issues/517 | | 13 | Bug: https://github.com/imageworks/OpenColorIO/issues/517 |
14 | | | 14 | |
| @@ -48,13 +48,26 @@ Bug: https://github.com/imageworks/OpenC | | | @@ -48,13 +48,26 @@ Bug: https://github.com/imageworks/OpenC |
48 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::GroupTransform>; | | 48 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::GroupTransform>; |
49 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::LogTransform>; | | 49 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::LogTransform>; |
50 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::LookTransform>; | | 50 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::LookTransform>; |
51 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::MatrixTransform>; | | 51 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::MatrixTransform>; |
52 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::TruelightTransform>; | | 52 | - template <> class TypedKeyNotFound<OCIO_NAMESPACE::TruelightTransform>; |
53 | -} | | 53 | -} |
54 | -#pragma GCC visibility pop | | 54 | -#pragma GCC visibility pop |
55 | - | | 55 | - |
56 | -#endif | | 56 | -#endif |
57 | - | | 57 | - |
58 | #ifdef WIN32 | | 58 | #ifdef WIN32 |
59 | #pragma warning( push ) | | 59 | #pragma warning( push ) |
60 | #pragma warning( disable: 4146 ) | | 60 | #pragma warning( disable: 4146 ) |
| | | 61 | @@ -1439,11 +1402,7 @@ OCIO_NAMESPACE_ENTER |
| | | 62 | |
| | | 63 | // check profile version |
| | | 64 | int profile_version = 0; |
| | | 65 | -#ifdef OLDYAML |
| | | 66 | - if(node.FindValue("ocio_profile_version") == NULL) |
| | | 67 | -#else |
| | | 68 | - if(node["ocio_profile_version"] == NULL) |
| | | 69 | -#endif |
| | | 70 | + if(!node["ocio_profile_version"].IsDefined()) |
| | | 71 | { |
| | | 72 | std::ostringstream os; |
| | | 73 | os << "The specified file "; |