SVN commit 1222106 by khudyakov: Constify SkyMesh::index(...) M +5 -5 skymesh.cpp M +5 -5 skymesh.h --- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymesh.cpp #1222105:1222106 @@ -97,7 +97,7 @@ return ( intersectSize( DRAW_BUF ) * 100 < percent * size() ); } -Trixel SkyMesh::index(SkyPoint *p) +Trixel SkyMesh::index(const SkyPoint* p) { return HTMesh::index( p->ra0().Degrees(), p->dec0().Degrees() ); } @@ -118,7 +118,7 @@ } -void SkyMesh::index(SkyPoint *p, double radius, MeshBufNum_t bufNum ) +void SkyMesh::index(const SkyPoint *p, double radius, MeshBufNum_t bufNum ) { HTMesh::intersect( p->ra().Degrees(), p->dec().Degrees(), radius, (BufNum) bufNum ); @@ -127,20 +127,20 @@ printf("Warining: overlapping buffer: %d\n", bufNum); } -void SkyMesh::index( SkyPoint* p1, SkyPoint* p2 ) +void SkyMesh::index( const SkyPoint* p1, const SkyPoint* p2 ) { HTMesh::intersect( p1->ra0().Degrees(), p1->dec0().Degrees(), p2->ra0().Degrees(), p2->dec0().Degrees() ); } -void SkyMesh::index( SkyPoint* p1, SkyPoint* p2, SkyPoint* p3 ) +void SkyMesh::index( const SkyPoint* p1, const SkyPoint* p2, const SkyPoint* p3 ) { HTMesh::intersect( p1->ra0().Degrees(), p1->dec0().Degrees(), p2->ra0().Degrees(), p2->dec0().Degrees(), p3->ra0().Degrees(), p3->dec0().Degrees() ); } -void SkyMesh::index( SkyPoint* p1, SkyPoint* p2, SkyPoint* p3, SkyPoint* p4 ) +void SkyMesh::index( const SkyPoint* p1, const SkyPoint* p2, const SkyPoint* p3, const SkyPoint* p4 ) { HTMesh::intersect( p1->ra0().Degrees(), p1->dec0().Degrees(), p2->ra0().Degrees(), p2->dec0().Degrees(), --- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymesh.h #1222105:1222106 @@ -137,7 +137,7 @@ /* @short returns the index of the trixel containing p. */ - Trixel index( SkyPoint *p ); + Trixel index( const SkyPoint *p ); /** * @short returns the sky region needed to cover the rectangle defined by two @@ -202,22 +202,22 @@ /* @short finds the indices of the trixels covering the circle specified * by center and radius. */ - void index( SkyPoint *center, double radius, MeshBufNum_t bufNum=DRAW_BUF ); + void index( const SkyPoint *center, double radius, MeshBufNum_t bufNum=DRAW_BUF ); /* @short finds the indices of the trixels covering the line segment * connecting p1 and p2. */ - void index( SkyPoint* p1, SkyPoint* p2 ); + void index( const SkyPoint* p1, const SkyPoint* p2 ); /* @short finds the indices of the trixels covering the triangle * specified by vertices: p1, p2, and p3. */ - void index( SkyPoint* p1, SkyPoint* p2, SkyPoint* p3 ); + void index( const SkyPoint* p1, const SkyPoint* p2, const SkyPoint* p3 ); /* @short finds the indices of the trixels covering the quadralateral * specified by the vertices: p1, p2, p3, and p4. */ - void index( SkyPoint* p1, SkyPoint* p2, SkyPoint* p3, SkyPoint* p4 ); + void index( const SkyPoint* p1, const SkyPoint* p2, const SkyPoint* p3, const SkyPoint* p4 ); //----- IndexHash Routines -----