added 64-bit compatibility (unsigned int -> void*)
This commit is contained in:
parent
4447fab921
commit
81bca52d1b
|
@ -271,15 +271,15 @@ namespace io {
|
|||
/* end header */
|
||||
|
||||
if(vertSize!=0){
|
||||
size_t offsetV = (size_t) &m.vert[0];
|
||||
void * offsetV = (void*) &m.vert[0];
|
||||
/* write the address of the first vertex */
|
||||
fwrite(&offsetV,sizeof(size_t),1,F());
|
||||
fwrite(&offsetV,sizeof(void *),1,F());
|
||||
}
|
||||
|
||||
if(faceSize!=0){
|
||||
size_t offsetF= ( size_t) &m.face[0];
|
||||
void * offsetF= (void*)&m.face[0];
|
||||
/* write the address of the first face */
|
||||
fwrite(&offsetF,sizeof( size_t),1,F());
|
||||
fwrite(&offsetF,sizeof( void *),1,F());
|
||||
}
|
||||
/* save the object mesh */
|
||||
fwrite(&m.shot,sizeof(Shot<typename SaveMeshType::ScalarType>),1,F());
|
||||
|
|
|
@ -652,15 +652,15 @@ namespace io {
|
|||
if(fnameV != nameV) return VMI_INCOMPATIBLE_VERTEX_TYPE;
|
||||
if(fnameF != nameF) return VMI_INCOMPATIBLE_FACE_TYPE;
|
||||
|
||||
int offsetV=0,offsetF=0;
|
||||
void * offsetV = 0,*offsetF = 0;
|
||||
|
||||
if(vertSize!=0)
|
||||
/* read the address of the first vertex */
|
||||
fread(&offsetV,sizeof( int),1,F());
|
||||
fread(&offsetV,sizeof( void *),1,F());
|
||||
|
||||
if(faceSize!=0)
|
||||
/* read the address of the first face */
|
||||
fread(&offsetF,sizeof( int),1,F());
|
||||
fread(&offsetF,sizeof( void *),1,F());
|
||||
|
||||
/* read the object mesh */
|
||||
fread(&m.shot,sizeof(Shot<typename OpenMeshType::ScalarType>),1,F());
|
||||
|
|
Loading…
Reference in New Issue