Once more, overload problem under 64 bits and unsigned int/size_t.

This commit is contained in:
The Coriolis Project 2010-12-12 22:35:40 +00:00
parent 80bf4027fb
commit 49af37f6a4
2 changed files with 8 additions and 8 deletions

View File

@ -64,7 +64,7 @@ namespace Katabatic {
// Class : "Katabatic::GCell::CompareByDensity". // Class : "Katabatic::GCell::CompareByDensity".
GCell::CompareByDensity::CompareByDensity ( size_t depth ) GCell::CompareByDensity::CompareByDensity ( unsigned int depth )
: _depth(depth) : _depth(depth)
{ } { }
@ -179,7 +179,7 @@ namespace Katabatic {
} }
bool GCell::isSaturated ( size_t depth ) const bool GCell::isSaturated ( unsigned int depth ) const
{ return getDensity(depth) > Session::getSaturateRatio(); } { return getDensity(depth) > Session::getSaturateRatio(); }

View File

@ -76,10 +76,10 @@ namespace Katabatic {
public: public:
class CompareByDensity : public binary_function<GCell*,GCell*,bool> { class CompareByDensity : public binary_function<GCell*,GCell*,bool> {
public: public:
CompareByDensity ( size_t depth ); CompareByDensity ( unsigned int depth );
bool operator() ( GCell* lhs, GCell* rhs ); bool operator() ( GCell* lhs, GCell* rhs );
private: private:
size_t _depth; unsigned int _depth;
}; };
class CompareByKey { class CompareByKey {
public: public:
@ -107,7 +107,7 @@ namespace Katabatic {
virtual const Name& getName () const; virtual const Name& getName () const;
// Accessors. // Accessors.
inline bool isSaturated () const; inline bool isSaturated () const;
bool isSaturated ( size_t depth ) const; bool isSaturated ( unsigned int depth ) const;
inline bool isValid () const; inline bool isValid () const;
bool isAboveDensity ( float threshold ) const; bool isAboveDensity ( float threshold ) const;
bool hasFreeTrack ( size_t depth, float reserve ) const; bool hasFreeTrack ( size_t depth, float reserve ) const;
@ -132,7 +132,7 @@ namespace Katabatic {
float getHCapacity () const; float getHCapacity () const;
float getVCapacity () const; float getVCapacity () const;
inline float getCDensity ( bool update=true ) const; inline float getCDensity ( bool update=true ) const;
inline float getDensity ( size_t depth, bool update=true ) const; inline float getDensity ( unsigned int depth, bool update=true ) const;
float getDensity ( bool update=true ) const; float getDensity ( bool update=true ) const;
inline float getBlockage ( unsigned int depth ) const; inline float getBlockage ( unsigned int depth ) const;
float getStiffness () const; float getStiffness () const;
@ -241,7 +241,7 @@ namespace Katabatic {
inline float GCell::getCDensity ( bool update ) const inline float GCell::getCDensity ( bool update ) const
{ if (_invalid and update) const_cast<GCell*>(this)->updateDensity(); return _cDensity; } { if (_invalid and update) const_cast<GCell*>(this)->updateDensity(); return _cDensity; }
inline float GCell::getDensity ( size_t depth, bool update ) const inline float GCell::getDensity ( unsigned int depth, bool update ) const
{ if (_invalid and update) const_cast<GCell*>(this)->updateDensity(); return _densities[depth]; } { if (_invalid and update) const_cast<GCell*>(this)->updateDensity(); return _densities[depth]; }
inline float GCell::getBlockage ( unsigned int depth ) const inline float GCell::getBlockage ( unsigned int depth ) const
@ -262,7 +262,7 @@ namespace Katabatic {
inline float GCell::Key::getDensity () const { return _density; } inline float GCell::Key::getDensity () const { return _density; }
inline unsigned int GCell::Key::getIndex () const { return _index; } inline unsigned int GCell::Key::getIndex () const { return _index; }
inline void GCell::Key::update ( GCell* gcell, unsigned int depth ) inline void GCell::Key::update ( GCell* gcell, unsigned int depth )
{ _density=gcell->getDensity((size_t)depth); _index=gcell->getIndex(); } { _density=gcell->getDensity(depth); _index=gcell->getIndex(); }
inline bool operator< ( const GCell::Key& lhs, const GCell::Key& rhs ) inline bool operator< ( const GCell::Key& lhs, const GCell::Key& rhs )
{ {