diff --git a/vcg/space/color4.h b/vcg/space/color4.h index f9d2b9d0..d97e7480 100644 --- a/vcg/space/color4.h +++ b/vcg/space/color4.h @@ -259,8 +259,8 @@ inline static Color4 ColorRamp(const float &minf,const float &maxf ,float v ) return rc; } -inline static unsigned short ToUnsignedB5G5R5(Color4 &) { return 0;} -inline static unsigned short ToUnsignedR5G5B5(Color4 &) { return 0;} +inline static unsigned short ToUnsignedB5G5R5(const Color4 &) { return 0;} +inline static unsigned short ToUnsignedR5G5B5(const Color4 &) { return 0;} inline static Color4 FromUnsignedB5G5R5(unsigned short) { @@ -420,7 +420,7 @@ typedef Color4 Color4d; template<> -inline unsigned short Color4::ToUnsignedB5G5R5(Color4 &cc) +inline unsigned short Color4::ToUnsignedB5G5R5(const Color4 &cc) { unsigned short r = cc[0]/8; unsigned short g = cc[1]/8; @@ -430,7 +430,7 @@ inline unsigned short Color4::ToUnsignedB5G5R5(Color4 -inline unsigned short Color4::ToUnsignedR5G5B5(Color4 &cc) +inline unsigned short Color4::ToUnsignedR5G5B5(const Color4 &cc) { unsigned short r = cc[0]/8; unsigned short g = cc[1]/8; diff --git a/wrap/io_trimesh/export_stl.h b/wrap/io_trimesh/export_stl.h index 50859273..0ed6d9c9 100644 --- a/wrap/io_trimesh/export_stl.h +++ b/wrap/io_trimesh/export_stl.h @@ -75,14 +75,14 @@ public: typedef typename SaveMeshType::FaceType FaceType; typedef unsigned short CallBackSTLFaceAttribute(const SaveMeshType &m, const FaceType &f); -static int Save(SaveMeshType &m, const char * filename, const int &mask, CallBackPos *) +static int Save(const SaveMeshType &m, const char * filename, const int &mask, CallBackPos *) { return Save(m,filename,true,mask); } -static int Save(SaveMeshType &m, const char * filename , bool binary =true, int mask=0, const char *objectname=0, bool magicsMode=0) +static int Save(const SaveMeshType &m, const char * filename , bool binary =true, int mask=0, const char *objectname=0, bool magicsMode=0) { - typedef typename SaveMeshType::FaceIterator FaceIterator; + typedef typename SaveMeshType::ConstFaceIterator FaceIterator; FILE *fp; fp = fopen(filename,"wb");