Commit 0510d14f authored by Jan Möbius's avatar Jan Möbius

Two more fixes

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@871 fdac6126-5c0c-442c-9429-916003d36597
parent b9df6c40
......@@ -106,11 +106,11 @@ HalfedgeHandle ArrayKernel::handle(const Halfedge& _he) const
// There are two halfedges stored per edge
// Get memory position inside edge vector and devide by size of an edge
// to get the corresponding edge for the requested halfedge
unsigned int eh = ( (char*)&_he - (char*)&edges_.front() ) / sizeof(Edge) ;
size_t eh = ( (char*)&_he - (char*)&edges_.front() ) / sizeof(Edge) ;
assert((&_he == &edges_[eh].halfedges_[0]) ||
(&_he == &edges_[eh].halfedges_[1]));
return ((&_he == &edges_[eh].halfedges_[0]) ?
HalfedgeHandle(eh<<1) : HalfedgeHandle((eh<<1)+1));
HalfedgeHandle( int(eh)<<1) : HalfedgeHandle((int(eh)<<1)+1));
}
EdgeHandle ArrayKernel::handle(const Edge& _e) const
......
......@@ -75,7 +75,7 @@ RandomNumberGenerator::RandomNumberGenerator(const size_t _resolution) :
}
for ( unsigned int i = 0 ; i < iterations_ - 1; ++i ) {
maxNum_ *= (RAND_MAX + 1.0);
maxNum_ *= (RAND_MAX + 1);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment