This commit is contained in:
King_DuckZ 2014-12-13 00:22:50 +01:00
parent 0da607ab3d
commit bd241bbbd2
2 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ namespace dk {
#if defined(NDEBUG)
template <>
inline size_t get_index_from_pos ( const Vector<CoordinateScalarType, 2>& parPos, const Vector<CoordinateScalarType, 2>& parSize ) a_pure;
inline size_t get_index_from_pos<2> ( const Vector<CoordinateScalarType, 2>& parPos, const Vector<CoordinateScalarType, 2>& parSize ) a_pure;
#endif
} //namespace implem
@ -38,7 +38,7 @@ namespace dk {
ptrdiff_t distance_to ( const TileIterator& parOther );
bool equal ( const TileIterator& parOther ) const;
T& dereference ( void ) const { return (*m_data)[get_current_index()]; }
size_t get_current_index ( void ) const { return implem::get_index_from_pos(m_pos, m_total); }
size_t get_current_index ( void ) const { return implem::get_index_from_pos<D>(m_pos, m_total); }
coords m_pos;
coords m_from;

View file

@ -16,7 +16,7 @@ namespace dk {
#if defined(NDEBUG)
template <>
inline size_t get_index_from_pos (const Vector<CoordinateScalarType, 2>& parPos, const Vector<CoordinateScalarType, 2>& parSize) {
inline size_t get_index_from_pos<2> (const Vector<CoordinateScalarType, 2>& parPos, const Vector<CoordinateScalarType, 2>& parSize) {
return parPos.y() * parSize.x() + parPos.x();
}
#endif