Commit 7a730c5b authored by Sylvain Thery's avatar Sylvain Thery
Browse files

pb log2 n'existe pas sous windows

uint ... pas sous windows
parent 01a2ded0
...@@ -107,8 +107,8 @@ unsigned int ImplicitHierarchicalMap::faceLevel(Dart d) ...@@ -107,8 +107,8 @@ unsigned int ImplicitHierarchicalMap::faceLevel(Dart d)
++nbSubd ; // is treated here ++nbSubd ; // is treated here
it = phi1(it) ; it = phi1(it) ;
} while(m_edgeId[it] == eId) ; } while(m_edgeId[it] == eId) ;
fLevel -= (unsigned int)(log2(nbSubd)) ; //fLevel -= (unsigned int)(log2(nbSubd)) ; PB WINDOWS log2 n'existe pas sous Visual 2010 !!
fLevel -= (unsigned int)(log((double)nbSubd)/log(2.0)) ;
m_curLevel = cur ; m_curLevel = cur ;
return fLevel ; return fLevel ;
......
...@@ -106,7 +106,7 @@ void AttribContainer::merge(AttribContainer& cont) ...@@ -106,7 +106,7 @@ void AttribContainer::merge(AttribContainer& cont)
newId.resize(m_tableAttribs.size() + cont.m_tableAttribs.size()); newId.resize(m_tableAttribs.size() + cont.m_tableAttribs.size());
uint nbb = m_holesBlocks.size(); unsigned int nbb = m_holesBlocks.size();
// parcours des attributs de cont pour les ajouter dans this et stocker la correspondance // parcours des attributs de cont pour les ajouter dans this et stocker la correspondance
for (MapNameId::iterator it = cont.m_attribNameMap.begin(); it != cont.m_attribNameMap.end(); ++it) for (MapNameId::iterator it = cont.m_attribNameMap.begin(); it != cont.m_attribNameMap.end(); ++it)
...@@ -426,7 +426,7 @@ void AttribContainer::saveBin(CGoGNostream& fs, unsigned int id) ...@@ -426,7 +426,7 @@ void AttribContainer::saveBin(CGoGNostream& fs, unsigned int id)
(*it)->saveBin(fs); (*it)->saveBin(fs);
// les indices des blocks libres // les indices des blocks libres
fs.write(reinterpret_cast<const char*>(&m_tableBlocksWithFree[0]), m_tableBlocksWithFree.size() * sizeof(uint)); fs.write(reinterpret_cast<const char*>(&m_tableBlocksWithFree[0]), m_tableBlocksWithFree.size() * sizeof(unsigned int));
} }
unsigned int AttribContainer::loadBinId(CGoGNistream& fs) unsigned int AttribContainer::loadBinId(CGoGNistream& fs)
...@@ -497,7 +497,7 @@ bool AttribContainer::loadBin(CGoGNistream& fs) ...@@ -497,7 +497,7 @@ bool AttribContainer::loadBin(CGoGNistream& fs)
// les indices des blocks libres // les indices des blocks libres
m_tableBlocksWithFree.resize(szBWF); m_tableBlocksWithFree.resize(szBWF);
fs.read(reinterpret_cast<char*>(&(m_tableBlocksWithFree[0])), szBWF*sizeof(uint)); fs.read(reinterpret_cast<char*>(&(m_tableBlocksWithFree[0])), szBWF*sizeof(unsigned int));
return true; return true;
} }
......
...@@ -146,30 +146,30 @@ void HoleBlockRef::saveBin(CGoGNostream& fs) ...@@ -146,30 +146,30 @@ void HoleBlockRef::saveBin(CGoGNostream& fs)
// std::cout << "save bf "<< m_nb<< " / "<< m_nbref<< " / "<< m_nbfree << std::endl; // std::cout << "save bf "<< m_nb<< " / "<< m_nbref<< " / "<< m_nbfree << std::endl;
// on sauve les trois nombres; // on sauve les trois nombres;
uint numbers[3]; unsigned int numbers[3];
numbers[0] = m_nb; numbers[0] = m_nb;
numbers[1] = m_nbref; numbers[1] = m_nbref;
numbers[2] = m_nbfree; numbers[2] = m_nbfree;
fs.write(reinterpret_cast<const char*>(numbers), 3*sizeof(uint) ); fs.write(reinterpret_cast<const char*>(numbers), 3*sizeof(unsigned int) );
// sauve les ref count // sauve les ref count
fs.write(reinterpret_cast<const char*>(m_refCount), _BLOCKSIZE_*sizeof(uint)); fs.write(reinterpret_cast<const char*>(m_refCount), _BLOCKSIZE_*sizeof(unsigned int));
// sauve les free lines // sauve les free lines
fs.write(reinterpret_cast<const char*>(m_tableFree), m_nbfree*sizeof(uint)); fs.write(reinterpret_cast<const char*>(m_tableFree), m_nbfree*sizeof(unsigned int));
} }
bool HoleBlockRef::loadBin(CGoGNistream& fs) bool HoleBlockRef::loadBin(CGoGNistream& fs)
{ {
unsigned int numbers[3]; unsigned int numbers[3];
fs.read(reinterpret_cast<char*>(numbers), 3*sizeof(uint)); fs.read(reinterpret_cast<char*>(numbers), 3*sizeof(unsigned int));
m_nb = numbers[0]; m_nb = numbers[0];
m_nbref = numbers[1]; m_nbref = numbers[1];
m_nbfree = numbers[2]; m_nbfree = numbers[2];
fs.read(reinterpret_cast<char*>(m_refCount), _BLOCKSIZE_*sizeof(uint)); fs.read(reinterpret_cast<char*>(m_refCount), _BLOCKSIZE_*sizeof(unsigned int));
fs.read(reinterpret_cast<char*>(m_tableFree), m_nbfree*sizeof(uint)); fs.read(reinterpret_cast<char*>(m_tableFree), m_nbfree*sizeof(unsigned int));
return true; return true;
} }
......
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