Commit 6fc2e3cb authored by Sylvain Thery's avatar Sylvain Thery

64 bits warning uint/size_t & float/double conversion

parent a317ea8e
......@@ -83,7 +83,7 @@ void MyQT::cb_explode(int x)
void MyQT::cb_initGL()
{
m_render_topo = new Algo::Render::GL2::TopoRender();
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f);
m_dm_topo = new DartMarker<MAP>(myMap);
}
......@@ -174,7 +174,7 @@ void MyQT::traverse2()
m_drawer.endList();
// SelectorMarked sm(*m_dm_topo);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f, 0.8f);
m_render_topo->updateData<PFP>(myMap, position, 0.95f, 0.9f);
updateGL();
}
......
......@@ -53,7 +53,7 @@ typename V_ATT::DATA_TYPE volumeCentroid(typename PFP::MAP& map, Vol d, const V_
}
,false);
center /= double(count) ;
center /= float(count) ;
return center ;
}
......@@ -88,7 +88,7 @@ typename V_ATT::DATA_TYPE faceCentroid(typename PFP::MAP& map, Face f, const V_A
center += attributs[it];
++count ;
});
center /= double(count);
center /= float(count);
return center ;
}
......
......@@ -139,11 +139,11 @@ inline void Histogram::initData(const ATTR& attr)
inline unsigned int Histogram::whichClass(double val) const
{
if (val == m_max)
return m_populations.size()-1;
return uint32(m_populations.size()-1);
double x = (val - m_min)/m_interWidth;
if ((x<0) || (val>=m_max))
return -1;
return (unsigned int)(x);
return uint32(x);
}
inline unsigned int Histogram::whichQuantille(double val) const
......@@ -217,7 +217,7 @@ unsigned int Histogram::markCellsOfHistogramColumn(unsigned int c, CELLMARKER& c
double bi = (m_max-m_min)/m_nbclasses * c + m_min;
double bs = (m_max-m_min)/m_nbclasses * (c+1) + m_min;
unsigned int nb=m_dataIdx.size();
unsigned int nb = uint32(m_dataIdx.size());
unsigned int i=0;
while ((i<nb) && (data(i)< bi))
......
......@@ -79,7 +79,7 @@ bool importMesh(typename PFP::MAP& map, MeshTablesSurface<PFP>& mts)
edgesBuffer.pop_back();
// create only non degenerated faces
nbe = edgesBuffer.size();
nbe = uint32(edgesBuffer.size());
if (nbe > 2)
{
Dart d = map.newFace(nbe, false);
......@@ -471,7 +471,7 @@ bool importMeshSurfToVol(typename PFP::MAP& map, Surface::Import::MeshTablesSurf
edgesBuffer.pop_back();
// create only non degenerated faces
nbe = edgesBuffer.size();
nbe = uint32(edgesBuffer.size());
if (nbe > 2)
{
Dart dprev = NIL;
......
......@@ -601,7 +601,7 @@ bool MeshTablesSurface<PFP>::importObj(const std::string& filename, std::vector<
std::getline(fp, ligne);
} while (!fp.eof());
m_nbVertices = verticesID.size();
m_nbVertices = uint32(verticesID.size());
// close/clear/open only way to go back to beginning of file
fp.close();
......@@ -645,7 +645,7 @@ bool MeshTablesSurface<PFP>::importObj(const std::string& filename, std::vector<
}
}
unsigned int n = table.size();
unsigned int n = uint32(table.size());
m_nbEdges.push_back(short(n));
for (unsigned int j = 0; j < n; ++j)
{
......@@ -1627,7 +1627,7 @@ bool MeshTablesSurface<PFP>::mergeCloseVertices()
float py = floor((P[1]/bbsize[1])*NBV);
float px = floor((P[0]/bbsize[0])*NBV);
unsigned int index = NBV*NBV*pz + NBV*py + px;
unsigned int index = uint32(NBV*NBV*pz + NBV*py + px);
if (pz==63)
std::cout << "z 63 bb:"<<bb<<" P="<<positions[i]<< std::endl;
......@@ -1659,7 +1659,7 @@ bool MeshTablesSurface<PFP>::mergeCloseVertices()
}
d /= double(nbf);
typename PFP::REAL epsilon = d/10000.0;
typename PFP::REAL epsilon = typename PFP::REAL(d / 10000.0);
// traverse vertices
......@@ -1780,7 +1780,7 @@ bool MeshTablesSurface<PFP>::importSTLAscii(const std::string& filename, std::ve
typename std::vector<VEC3>::iterator it = find (m_points.begin(), m_points.end(), pos);
if (it != m_points.end())
{
unsigned int idP = it - m_points.begin();
unsigned int idP = uint32(it - m_points.begin());
m_emb.push_back(verticesID[idP]);
}
else
......@@ -1804,8 +1804,8 @@ bool MeshTablesSurface<PFP>::importSTLAscii(const std::string& filename, std::ve
}while (!fp.eof());
m_nbVertices = m_points.size();
m_nbFaces = m_nbEdges.size();
m_nbVertices = uint32(m_points.size());
m_nbFaces = uint32(m_nbEdges.size());
fp.close();
return true;
......@@ -1864,7 +1864,7 @@ bool MeshTablesSurface<PFP>::importSTLBin(const std::string& filename, std::vect
typename std::vector<VEC3>::iterator it = find (m_points.begin(), m_points.end(), pos);
if (it != m_points.end())
{
unsigned int idP = it - m_points.begin();
unsigned int idP = uint32(it - m_points.begin());
m_emb.push_back(verticesID[idP]);
}
else
......@@ -1880,8 +1880,8 @@ bool MeshTablesSurface<PFP>::importSTLBin(const std::string& filename, std::vect
m_nbEdges.push_back(3);
}
m_nbVertices = m_points.size();
m_nbFaces = m_nbEdges.size();
m_nbVertices = uint32(m_points.size());
m_nbFaces = uint32(m_nbEdges.size());
fp.close();
return true;
......
......@@ -51,7 +51,7 @@ inline float floatFromNas(std::string& s_v)
if ((pos1!=std::string::npos) && (pos1!=0))
{
std::string res = s_v.substr(0,pos1) + "e" + s_v.substr(pos1,8-pos1);
x = atof(res.c_str());
x = float(atof(res.c_str()));
}
else
{
......@@ -59,11 +59,11 @@ inline float floatFromNas(std::string& s_v)
if ((pos2!=std::string::npos) && (pos2!=0))
{
std::string res = s_v.substr(0,pos2) + "e" + s_v.substr(pos2,8-pos2);
x = atof(res.c_str());
x = float(atof(res.c_str()));
}
else
{
x = atof(s_v.c_str());
x = float(atof(s_v.c_str()));
}
}
return x;
......
......@@ -250,7 +250,7 @@ void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs)
me.template unmarkOrbit<PFP::MAP::EDGE_OF_PARENT>(it);
it = map.phi1(it) ;
} while(it != d) ;
center /= double(count);
center /= float(count);
Dart cf = quadranguleFace<PFP>(map, d); // quadrangule the face
attributs[cf] = center; // affect the data to the central vertex
}
......@@ -302,10 +302,10 @@ void CatmullClarkSubdivision(typename PFP::MAP& map, EMBV& attributs)
} while (x != *vert);
EMB emcp = attributs[*vert];
emcp *= double((n-2)*n); // V' = (n-2)/n*V + 1/n2 *(F+E)
emcp *= float((n-2)*n); // V' = (n-2)/n*V + 1/n2 *(F+E)
emcp += temp;
emcp += temp2;
emcp /= double(n*n);
emcp /= float(n*n);
attributs[*vert] = emcp ;
}
......
......@@ -519,11 +519,11 @@ class Voxellisation
if((index_sommet=m_indexes.find(x + y*m_taille_x + z*m_taille_x*m_taille_y))==m_indexes.end())
{
//Si le sommet n'a pas encore t ajout
m_indexes[x + y*m_taille_x + z*m_taille_x*m_taille_y] = m_sommets.size(); //On prcise l'index du nouveau sommet
m_indexes[x + y*m_taille_x + z*m_taille_x*m_taille_y] = int(m_sommets.size()); //On prcise l'index du nouveau sommet
m_sommets.push_back(Geom::Vec3f(m_bb_min[0]+x*m_transfo[0], m_bb_min[1]+y*m_transfo[1], m_bb_min[2]+z*m_transfo[2])); //On ajoute le sommet avec ses coordonnes relles
}
if(index_sommet==m_indexes.end())
m_faces.push_back(m_sommets.size()-1); //On ajoute le sommet au tableau renseignant les faces
m_faces.push_back(int(m_sommets.size()-1)); //On ajoute le sommet au tableau renseignant les faces
else
m_faces.push_back(index_sommet->second); //On ajoute le sommet au tableau renseignant les faces
}
......@@ -631,12 +631,12 @@ class Voxellisation
int getNbSommets()
{
return m_sommets.size();
return int(m_sommets.size());
}
int getNbFaces()
{
return m_faces.size()/4;
return int(m_faces.size()/4);
}
void checkVoxels(int type=1)
......
......@@ -92,8 +92,8 @@ void MapRender::recompute2Ears(const VertexAttribute<typename PFP::VEC3, typenam
// float dotpr1 = 1.0f - (v1*v2);
// float dotpr2 = 1.0f + (v1*v3);
float dotpr1 = acos(v1*v2) / (M_PI/2.0f);
float dotpr2 = acos(-(v1*v3)) / (M_PI/2.0f);
float dotpr1 = float(acos(v1*v2) / (M_PI/2.0));
float dotpr2 = float(acos(-(v1*v3)) / (M_PI/2.0));
if (!convex) // if convex no need to test if vertex is an ear (yes)
......@@ -143,7 +143,7 @@ float MapRender::computeEarAngle(const typename PFP::VEC3& P1, const typename PF
v2.normalize();
// float dotpr = 1.0f - (v1*v2);
float dotpr = acos(v1*v2) / (M_PI/2.0f);
float dotpr = float( acos(v1*v2) / (M_PI/2.0) );
VEC3 vn = v1^v2;
if (vn*normalPoly > 0.0f)
......@@ -532,7 +532,7 @@ void MapRender::initPrimitives(typename PFP::MAP& map, int prim, const VertexAtt
break;
}
m_nbIndices[prim] = tableIndices.size();
m_nbIndices[prim] = GLuint(tableIndices.size());
m_indexBufferUpToDate[prim] = true;
// setup du buffer d'indices
......
......@@ -353,7 +353,7 @@ template<typename PFP>
Dart Topo3Render<PFP>::pickColor(unsigned int x, unsigned int y)
{
//more easy picking for
unsigned int dw = m_topo_dart_width;
float dw = m_topo_dart_width;
m_topo_dart_width+=2;
// save clear color and set to zero
......@@ -651,7 +651,7 @@ void Topo3RenderMap<PFP>::updateData(MAP& mapx, const VertexAttribute<VEC3, MAP>
dd = mapx.phi1(dd);
} while (dd != d);
unsigned int nb = vecPos.size();
unsigned int nb = uint32(vecPos.size());
vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop
......
......@@ -157,7 +157,7 @@ void TopoRender::updateData(typename PFP::MAP& map, const VertexAttribute<typena
if (withBoundary || !map.template isBoundaryMarked<2>(d))
vecDarts.push_back(d);
}
this->m_nbDarts = vecDarts.size();
this->m_nbDarts = GLuint(vecDarts.size());
// debut phi1
DartAutoAttribute<VEC3, MAP> fv1(map);
......@@ -204,7 +204,7 @@ void TopoRender::updateData(typename PFP::MAP& map, const VertexAttribute<typena
}
}
unsigned int nb = vecPos.size();
unsigned int nb = uint32(vecPos.size());
vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop
k = 1.0f - ke;
......@@ -246,7 +246,7 @@ void TopoRender::updateData(typename PFP::MAP& map, const VertexAttribute<typena
vecPos.push_back(P);
} while (dd != d);
unsigned int nb = vecPos.size()/2;
unsigned int nb = uint32(vecPos.size()/2);
float k = 1.0f - ke;
for (unsigned int i = 0; i < nb; ++i)
{
......@@ -305,7 +305,7 @@ void TopoRender::updateData(typename PFP::MAP& map, const VertexAttribute<typena
*positionF1++ = PFP::toVec3f(fv1[d]);
*positionF1++ = PFP::toVec3f(fv11[e]);
}
this->m_nbRel1 = vecDarts.size();
this->m_nbRel1 = GLuint(vecDarts.size());
this->m_vbo1->bind();
glUnmapBuffer(GL_ARRAY_BUFFER);
......@@ -357,7 +357,7 @@ void TopoRender::updateDataGMap(typename PFP::MAP& dmap, const VertexAttribute<t
if (withBoundary || !map.template isBoundaryMarked<2>(d))
vecDarts.push_back(d);
}
this->m_nbDarts = vecDarts.size();
this->m_nbDarts = uint32(vecDarts.size());
// debut phi1
DartAutoAttribute<VEC3, MAP> fv1(map);
......@@ -403,7 +403,7 @@ void TopoRender::updateDataGMap(typename PFP::MAP& dmap, const VertexAttribute<t
*pit -= normal * this->m_normalShift;
}
}
unsigned int nb = vecPos.size();
unsigned int nb = uint32(vecPos.size());
vecPos.push_back(vecPos.front()); // copy the first for easy computation on next loop
k = 1.0f - ke;
......@@ -470,7 +470,7 @@ void TopoRender::updateDataGMap(typename PFP::MAP& dmap, const VertexAttribute<t
*positionF1++ = GPFP::toVec3f(fv1[d]);
*positionF1++ = GPFP::toVec3f(fv1[e]);
}
this->m_nbRel1 = vecDarts.size()/2;
this->m_nbRel1 = uint32(vecDarts.size()/2);
this->m_vbo1->bind();
glUnmapBuffer(GL_ARRAY_BUFFER);
......@@ -534,7 +534,7 @@ Dart TopoRender::picking(MAP& map,int x, int y, bool withBoundary)
shaderCol.setAttributeColor(&vboCol);
shaderCol.updateMatrices(m_shader1);
unsigned int dw = m_topo_dart_width;
float dw = m_topo_dart_width;
m_topo_dart_width+=2;
// save clear color and set to zero
......
......@@ -116,7 +116,7 @@ Dart Grid<PFP>::grid2D(unsigned int x, unsigned int y)
// add last row of vertices (y = ny)
int index = this->m_tableVertDarts.size()-(x+1); // pos of last inserted row of dart
int index = int(this->m_tableVertDarts.size())-(x+1); // pos of last inserted row of dart
for (unsigned int i = 0; i < x; ++i)
{
Dart dd = this->m_tableVertDarts[index++];
......
......@@ -86,7 +86,7 @@ AttributeMultiVector<T>* AttributeContainer::addAttribute(const std::string& att
}
else
{
index = m_tableAttribs.size() ;
index = uint32(m_tableAttribs.size()) ;
m_tableAttribs.push_back(amv) ;
}
......@@ -105,7 +105,7 @@ AttributeMultiVector<T>* AttributeContainer::addAttribute(const std::string& att
m_lineCost += sizeof(T) ;
// resize the new attribute so that it has the same size than others
amv->setNbBlocks(m_holesBlocks.size()) ;
amv->setNbBlocks(uint32(m_holesBlocks.size())) ;
m_nbAttributes++ ;
......@@ -214,17 +214,17 @@ inline unsigned int AttributeContainer::size() const
inline unsigned int AttributeContainer::capacity() const
{
return m_holesBlocks.size() * _BLOCKSIZE_;
return uint32(m_holesBlocks.size() * _BLOCKSIZE_);
}
inline unsigned int AttributeContainer::memoryTotalSize() const
{
return capacity() * (m_lineCost + 8);
return uint32(capacity() * (m_lineCost + 8));
}
inline unsigned int AttributeContainer::memorySize() const
{
return size() * (m_lineCost + 8);
return uint32(size() * (m_lineCost + 8));
}
inline bool AttributeContainer::used(unsigned int index) const
......
......@@ -38,6 +38,8 @@
namespace CGoGN
{
typedef unsigned int uint32;
enum CGoGNCodeType
{CGoGNUNKNOWNTYPE=0,
CGoGNINT,CGoGNUINT,
......
......@@ -142,12 +142,12 @@ void AttributeMultiVector<T>::setNbBlocks(unsigned int nbb)
{
if (nbb >= m_tableData.size())
{
for (unsigned int i= m_tableData.size(); i <nbb; ++i)
for (size_t i= m_tableData.size(); i <nbb; ++i)
addBlock();
}
else
{
for (unsigned int i = nbb; i < m_tableData.size(); ++i)
for (size_t i = nbb; i < m_tableData.size(); ++i)
delete[] m_tableData[i];
m_tableData.resize(nbb);
}
......@@ -156,7 +156,7 @@ void AttributeMultiVector<T>::setNbBlocks(unsigned int nbb)
template <typename T>
unsigned int AttributeMultiVector<T>::getNbBlocks() const
{
return m_tableData.size();
return uint32(m_tableData.size());
}
template <typename T>
......@@ -279,7 +279,7 @@ unsigned int AttributeMultiVector<T>::getBlocksPointers(std::vector<void*>& addr
for (typename std::vector<T*>::const_iterator it = m_tableData.begin(); it != m_tableData.end(); ++it)
addr.push_back(*it);
return addr.size();
return uint32(addr.size());
}
/**************************************
......@@ -322,8 +322,8 @@ void AttributeMultiVector<T>::saveBin(CGoGNostream& fs, unsigned int id)
{
unsigned int nbs[3];
nbs[0] = id;
int len1 = m_attrName.size()+1;
int len2 = m_typeName.size()+1;
int len1 = int(m_attrName.size()+1);
int len2 = int(m_typeName.size()+1);
nbs[1] = len1;
nbs[2] = len2;
fs.write(reinterpret_cast<const char*>(nbs),3*sizeof(unsigned int));
......@@ -335,7 +335,7 @@ void AttributeMultiVector<T>::saveBin(CGoGNostream& fs, unsigned int id)
memcpy(buffer+len1,s2,len2);
fs.write(reinterpret_cast<const char*>(buffer),(len1+len2)*sizeof(char));
nbs[0] = m_tableData.size();
nbs[0] = int(m_tableData.size());
nbs[1] = nbs[0] * _BLOCKSIZE_* sizeof(T);
fs.write(reinterpret_cast<const char*>(nbs),2*sizeof(unsigned int));
......
......@@ -82,12 +82,12 @@ public:
{
if (nbb >= m_tableData.size())
{
for (unsigned int i= m_tableData.size(); i <nbb; ++i)
for (size_t i= m_tableData.size(); i <nbb; ++i)
addBlock();
}
else
{
for (unsigned int i = m_tableData.size()-1; i>=nbb; --i)
for (size_t i = m_tableData.size()-1; i>=nbb; --i)
delete[] m_tableData[i];
m_tableData.resize(nbb);
......@@ -97,7 +97,7 @@ public:
unsigned int getNbBlocks() const
{
return m_tableData.size();
return uint32(m_tableData.size());
}
// void addBlocksBefore(unsigned int nbb);
......@@ -288,7 +288,7 @@ public:
for (auto it = m_tableData.begin(); it != m_tableData.end(); ++it)
addr.push_back(NULL );
return addr.size();
return uint32(addr.size());
}
......@@ -347,8 +347,8 @@ public:
{
unsigned int nbs[3];
nbs[0] = id;
int len1 = m_attrName.size()+1;
int len2 = m_typeName.size()+1;
int len1 = int(m_attrName.size()+1);
int len2 = int(m_typeName.size()+1);
nbs[1] = len1;
nbs[2] = len2;
fs.write(reinterpret_cast<const char*>(nbs),3*sizeof(unsigned int));
......@@ -360,7 +360,7 @@ public:
memcpy(buffer+len1,s2,len2);
fs.write(reinterpret_cast<const char*>(buffer),(len1+len2)*sizeof(char));
nbs[0] = m_tableData.size();
nbs[0] = int(m_tableData.size());
nbs[1] = nbs[0] * _BLOCKSIZE_/32;
fs.write(reinterpret_cast<const char*>(nbs),2*sizeof(unsigned int));
......
......@@ -94,7 +94,7 @@ typename VEC::DATA_TYPE angle(const VEC& a, const VEC& b)
template <typename VEC3>
typename VEC3::DATA_TYPE triangleArea(const VEC3& p1, const VEC3& p2, const VEC3& p3)
{
return 0.5 * ((p2 - p1) ^ (p3 - p1)).norm() ;
return VEC3::DATA_TYPE(0.5 * ((p2 - p1) ^ (p3 - p1)).norm());
}
// normal of the plane spanned by 3 points in 3D
......
......@@ -50,7 +50,7 @@ inline unsigned int GenericMap::getCurrentThreadIndex() const
inline unsigned int GenericMap::addEmptyThreadIds(unsigned int n)
{
unsigned int nb = m_thread_ids.size();
unsigned int nb = uint32(m_thread_ids.size());
m_thread_ids.resize(nb + n);
return nb;
}
......
......@@ -363,7 +363,7 @@ inline void MapMulti::popLevel()
inline unsigned int MapMulti::getMaxLevel()
{
return m_mrDarts.size() - 1 ;
return uint32(m_mrDarts.size() - 1) ;
}
/****************************************
......
......@@ -787,8 +787,8 @@ void Map3<MAP_IMPL>::cutVolume(std::vector<Dart>& vd)
ParentMap::splitSurface(vd, true, true);
//create the boundary
Dart b1 = newBoundaryCycle(vd.size());
Dart b2 = newBoundaryCycle(vd.size());
Dart b1 = newBoundaryCycle(uint32(vd.size()));
Dart b2 = newBoundaryCycle(uint32(vd.size()));
Dart fit1 = this->phi2(e);
Dart fit2 = this->phi2(e2);
......
......@@ -55,9 +55,9 @@ public :
/// constructor
ClippingPresetAnimated():
m_attachedClippingShader (NULL),
m_animationOneStepIncrement (0.01),
m_animationSpeedFactor (1.0),
m_animParam (0.0)
m_animationOneStepIncrement (0.01f),
m_animationSpeedFactor (1.0f),
m_animParam (0.0f)
{}
public :
......
......@@ -108,18 +108,18 @@ inline Geom::Vec3f color_map_cyan_white_red(float x)
inline float scale_expand_within_0_1(float x, int n)
{
for (int i = 1; i <= n; i++)
x = (1.0f - cos(M_PI * x)) / 2.0f;
x = float((1.0 - cos(M_PI * x)) / 2.0);
for (int i = -1; i >= n; i--)
x = acos(1.0f - 2.0f * x) / M_PI;
x = float(acos(1.0 - 2.0 * x) / M_PI);
return x;
}
inline float scale_expand_towards_1(float x, int n)
{
for (int i = 1; i <= n; i++)
x = sin(x * M_PI / 2.0f);
x = float(sin(x * M_PI / 2.0));
for (int i = -1; i >= n; i--)
x = asin(x) * 2.0f / M_PI;
x = float(asin(x) * 2.0 / M_PI);
return x;
}
......
......@@ -103,7 +103,7 @@ void Histogram::populateQuantiles(unsigned int nbquantiles)
}
// compute exact populations
unsigned int nb = m_dataIdx.size();
size_t nb = m_dataIdx.size();
double pop = double(nb)/nbquantiles;
m_pop_quantiles.resize(nbquantiles);
......@@ -118,9 +118,9 @@ void Histogram::populateQuantiles(unsigned int nbquantiles)
for (unsigned int i = 0; i < nbquantiles; ++i)
{
cumul += m_pop_quantiles[i];
unsigned int icum = floor(cumul);
uint32 icum = uint32(floor(cumul));
double val = 0.0;
if (icum < m_dataIdx.size()-1)
if (icum < uint32(m_dataIdx.size()-1))
val = (data(icum)+ data(icum+1)) / 2.0;
else
val = m_dataIdx.back().first;
......@@ -132,7 +132,7 @@ void Histogram::populateQuantiles(unsigned int nbquantiles)
void Histogram::quantilesAreaCorrection()
{
unsigned int nbquantiles = m_pop_quantiles.size();
unsigned int nbquantiles = uint32(m_pop_quantiles.size());
// constant area correction
double areaQ1 = 100.0f; // use 100 as area if no histogram
......@@ -156,7 +156,7 @@ void Histogram::quantilesAreaCorrection()
void Histogram::histoColorizeVBO(Utils::VBO& vbo)
{
unsigned int nb = m_dataIdx.size();
unsigned int nb = uint32(m_dataIdx.size());
vbo.setDataSize(3);
vbo.allocate(nb);
Geom::Vec3f* colors = static_cast<Geom::Vec3f*>(vbo.lockPtr());
......@@ -184,7 +184,7 @@ unsigned int Histogram::cellsOfHistogramColumn(unsigned int c, std::vector<unsig
double bi = (m_max-m_min)/m_nbclasses * c + m_min;
double bs = (m_max-m_min)/m_nbclasses * (c+1) + m_min;
unsigned int nb=m_dataIdx.size();
unsigned int nb = uint32(m_dataIdx.size());
unsigned int i=0;
while ((i<nb) && (data(i)< bi))
......@@ -193,7 +193,7 @@ unsigned int Histogram::cellsOfHistogramColumn(unsigned int c, std::vector<unsig
while ((i<nb) && (data(i)< bs))
vc.push_back(idx(i++));
return vc.size();
return uint32(vc.size());
}
unsigned int Histogram::cellsOfQuantilesColumn( unsigned int c, std::vector<unsigned int>& vc) const
......@@ -203,7 +203,7 @@ unsigned int Histogram::cellsOfQuantilesColumn( unsigned int c, std::vector<unsi
double bi = m_interv[c];
double bs = m_interv[c+1];
unsigned int nb=m_dataIdx.size();
unsigned int nb = uint32(m_dataIdx.size());
unsigned int i=0;
while ((i<nb) && (data(i)< bi))
......@@ -212,7 +212,7 @@ unsigned int Histogram::cellsOfQuantilesColumn( unsigned int c, std::vector<unsi
while ((i<nb) && (data(i)< bs))
vc.push_back(idx(i++));
return vc.size();
return uint32(vc.size());
}
......
......@@ -54,7 +54,7 @@ MapRender::~MapRender()
void MapRender::initPrimitives(int prim, std::vector<GLuint>& tableIndices)
{
m_nbIndices[prim] = tableIndices.size();
m_nbIndices[prim] = uint32(tableIndices.size()) ;
m_indexBufferUpToDate[prim] = true;
// setup du buffer d'indices
......
......@@ -296,7 +296,7 @@ void AttributeContainer::compact(std::vector<unsigned int>& mapOldNew)
}
// free memory and resize
for (int i = m_holesBlocks.size() - 1; i > int(nbb); --i)
for (int i = int(m_holesBlocks.size()