Skip to content

Commit f91a37b

Browse files
committed
IECoreImage : Adapt for OIIO 3.0 TypeDesc changes
The type aliases nested in the TypeDesc class have been removed. Both OIIO 2 and 3 have namespace-level equivalents, so the new code will compile with both.
1 parent 45018e4 commit f91a37b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/IECoreImage/ImageReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ class ImageReader::Implementation
461461
m_inputFileName,
462462
0, miplevel(), // subimage, miplevel
463463
ustring( "fileformat" ),
464-
TypeDesc::TypeString, &fileFormat
464+
OIIO::TypeString, &fileFormat
465465
);
466466

467467
if( strcmp( fileFormat, "png" ) == 0 )

src/IECoreImage/OpenImageIOAlgo.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ DataView::DataView( const IECore::Data *d, bool createUStrings )
318318
data = static_cast<const UCharData *>( d )->baseReadable();
319319
break;
320320
case StringDataTypeId :
321-
type = TypeDesc::TypeString;
321+
type = OIIO::TypeString;
322322
m_charPointers.resize(1);
323323
m_charPointers[0] = static_cast<const StringData *>( d )->readable().c_str();
324324
if( createUStrings )
@@ -344,7 +344,7 @@ DataView::DataView( const IECore::Data *d, bool createUStrings )
344344
data = static_cast<const HalfData *>( d )->baseReadable();
345345
break;
346346
case IntDataTypeId :
347-
type = TypeDesc::TypeInt;
347+
type = OIIO::TypeInt;
348348
data = static_cast<const IntData *>( d )->baseReadable();
349349
break;
350350
case UInt64DataTypeId :
@@ -356,7 +356,7 @@ DataView::DataView( const IECore::Data *d, bool createUStrings )
356356
data = static_cast<const Int64Data *>( d )->baseReadable();
357357
break;
358358
case FloatDataTypeId :
359-
type = TypeDesc::TypeFloat;
359+
type = OIIO::TypeFloat;
360360
data = static_cast<const FloatData *>( d )->baseReadable();
361361
break;
362362
case DoubleDataTypeId :
@@ -420,15 +420,15 @@ DataView::DataView( const IECore::Data *d, bool createUStrings )
420420
data = static_cast<const M44dData *>( d )->baseReadable();
421421
break;
422422
case Color3fDataTypeId :
423-
type = TypeDesc::TypeColor;
423+
type = OIIO::TypeColor;
424424
data = static_cast<const Color3fData *>( d )->baseReadable();
425425
break;
426426
case Color4fDataTypeId :
427427
type = TypeDesc( TypeDesc::FLOAT, TypeDesc::VEC4, TypeDesc::COLOR );
428428
data = static_cast<const Color4fData *>( d )->baseReadable();
429429
break;
430430
case TimeCodeDataTypeId :
431-
type = TypeDesc::TypeTimeCode;
431+
type = OIIO::TypeTimeCode;
432432
data = static_cast<const TimeCodeData *>( d )->baseReadable();
433433
break;
434434

0 commit comments

Comments
 (0)