Skip to content

Commit e69ce1d

Browse files
committed
IndexedIO : Fix compilation with OpenEXR 3 on MacOS
In this case, `Imf::Xdr` can not read or write `size_t`.
1 parent 7ab9ca4 commit e69ce1d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/IECore/IndexedIO.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ struct IndexedIO::DataFlattenTraits<std::string*>
516516
{
517517
size_t stringLength = x[i].size();
518518

519-
IndexedIODetail::Writer<IndexedIODetail::MemoryStreamIO, IndexedIODetail::OutputMemoryStream, size_t>::write (mstream, stringLength);
519+
IndexedIODetail::Writer<IndexedIODetail::MemoryStreamIO, IndexedIODetail::OutputMemoryStream, uint64_t>::write (mstream, stringLength);
520520

521521
memcpy( mstream.next(), x[i].c_str(), stringLength );
522522

@@ -535,8 +535,8 @@ struct IndexedIO::DataFlattenTraits<std::string*>
535535

536536
for (size_t i = 0; i < arrayLength; i++)
537537
{
538-
size_t stringLength = 0;
539-
IndexedIODetail::Reader<IndexedIODetail::MemoryStreamIO, IndexedIODetail::InputMemoryStream, size_t>::read (mstream, stringLength);
538+
uint64_t stringLength = 0;
539+
IndexedIODetail::Reader<IndexedIODetail::MemoryStreamIO, IndexedIODetail::InputMemoryStream, uint64_t>::read (mstream, stringLength);
540540

541541
dst[i] = std::string(mstream.next(), stringLength);
542542
assert(dst[i].size() == stringLength);

0 commit comments

Comments
 (0)