From d3e020710e244bc8f4f0f8bc2089c160405c26eb Mon Sep 17 00:00:00 2001 From: Brandon Wong <29965003+brandonw3612@users.noreply.github.com> Date: Wed, 17 Apr 2024 00:00:39 +0800 Subject: [PATCH] fix compiler error regarding lvalue requirement --- wrap/io_trimesh/export_ply.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wrap/io_trimesh/export_ply.h b/wrap/io_trimesh/export_ply.h index c06b6496..b389d1bb 100644 --- a/wrap/io_trimesh/export_ply.h +++ b/wrap/io_trimesh/export_ply.h @@ -480,8 +480,10 @@ class ExporterPLY t = ScalarType(vp->N()[1]); fwrite(&t,sizeof(ScalarType),1,fpout); t = ScalarType(vp->N()[2]); fwrite(&t,sizeof(ScalarType),1,fpout); } - if( HasPerVertexFlags(m) && (pi.mask & Mask::IOM_VERTFLAGS) ) - fwrite(&(vp->Flags()),sizeof(int),1,fpout); + if( HasPerVertexFlags(m) && (pi.mask & Mask::IOM_VERTFLAGS) ) { + auto flags = vp->Flags(); + fwrite(&flags,sizeof(int),1,fpout); + } if( HasPerVertexColor(m) && (pi.mask & Mask::IOM_VERTCOLOR) ){ auto c = vp->C();