Commit 5b89244b authored by Jan Möbius's avatar Jan Möbius

More warning fixes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free-Staging@16320 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 1429b73d
......@@ -44,8 +44,8 @@ public:
*/
template<class T>
class AllocatorT{
int blockSize;
int index,remains;
size_t blockSize;
size_t index,remains;
std::vector<T*> memory;
public:
AllocatorT(void){
......@@ -121,7 +121,7 @@ public:
}
}
/** This method initiallizes the constructor and the blockSize variable specifies the
/** This method initializes the constructor and the blockSize variable specifies the
* the number of objects that should be pre-allocated at a time. */
void set( int blockSize){
reset();
......@@ -135,11 +135,11 @@ public:
* more memory. Note that if the number of objects requested is larger than the value blockSize with which
* the allocator was initialized, the request for memory will fail.
*/
T* newElements( int elements=1){
T* newElements( size_t elements=1){
T* mem;
if(!elements){return NULL;}
if(elements>blockSize){
fprintf(stderr,"Allocator Error, elements bigger than block-size: %d>%d\n",elements,blockSize);
std::cerr << "Allocator Error, elements bigger than block-size: " << elements << ">" << "blockSize" << std::endl;
return NULL;
}
if(remains<elements){
......
......@@ -2857,7 +2857,8 @@ void Octree< Degree >::FaceEdgesFunction::Function( const TreeOctNode* node1 , c
(*vertexCount)[key1].second--;
(*vertexCount)[key2].second++;
}
else fprintf( stderr , "Bad Edge 1: %d %lld\n" , ri1.key , ri2.key );
else
std::cerr << "Bad Edge 1:" << ri1.key << " " << ri2.key << std::endl;
}
}
}
......@@ -4024,7 +4025,7 @@ void Octree< Degree >::GetMCIsoEdges( TreeOctNode* node , int sDepth , std::vect
{
int r1 = MarchingCubes::HasEdgeRoots( node->nodeData.mcIndex , isoTri[j*3+k] );
int r2 = MarchingCubes::HasEdgeRoots( node->nodeData.mcIndex , isoTri[j*3+((k+1)%3)] );
fprintf( stderr , "Bad Edge 2: %d %d\t%d %d\n" , ri1.key , ri2.key , r1 , r2 );
std::cerr << "Bad Edge 2:" << ri1.key << " " << ri2.key << "\t" << r1 << " " << r2 << std::endl;
}
}
}
......
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