Ignore:
Timestamp:
Oct 27, 2009, 4:11:22 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
069034
Parents:
55a71b
Message:

Huge refactoring to make const what is const (ticket #38), continued.

  • too many changes because of too many cross-references to be able to list them up here.
  • NOTE that "make check" runs fine and did catch several error.
  • note that we had to use const_iterator several times when the map, ... was declared const.
  • at times we changed an allocated LinkedCell LCList(...) into

const LinkedCell *LCList;
LCList = new LinkedCell(...);

  • also mutable (see ticket #5) was used, e.g. for molecule::InternalPointer (PointCloud changes are allowed, because they are just accounting).

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/linkedcell.cpp

    r55a71b ra9b2a0a  
    3333 * \param RADIUS edge length of cells
    3434 */
    35 LinkedCell::LinkedCell(PointCloud *set, double radius)
     35LinkedCell::LinkedCell(const PointCloud * const set, const double radius)
    3636{
    3737  TesselPoint *Walker = NULL;
     
    109109 * \param RADIUS edge length of cells
    110110 */
    111 LinkedCell::LinkedCell(LinkedNodes *set, double radius)
     111LinkedCell::LinkedCell(LinkedNodes *set, const double radius)
    112112{
    113113  class TesselPoint *Walker = NULL;
     
    192192 * \return if all in intervals - true, else -false
    193193 */
    194 bool LinkedCell::CheckBounds()
     194bool LinkedCell::CheckBounds() const
    195195{
    196196  bool status = true;
     
    207207 * \return if all in intervals - true, else -false
    208208 */
    209 bool LinkedCell::CheckBounds(int relative[NDIM])
     209bool LinkedCell::CheckBounds(const int relative[NDIM]) const
    210210{
    211211  bool status = true;
     
    219219 * \return LinkedAtoms pointer to current cell, NULL if LinkedCell::n[] are out of bounds.
    220220 */
    221 LinkedNodes* LinkedCell::GetCurrentCell()
     221const LinkedNodes* LinkedCell::GetCurrentCell() const
    222222{
    223223  if (CheckBounds()) {
     
    233233 * \return LinkedAtoms pointer to current cell, NULL if LinkedCell::n[]+relative[] are out of bounds.
    234234 */
    235 LinkedNodes* LinkedCell::GetRelativeToCurrentCell(int relative[NDIM])
     235const LinkedNodes* LinkedCell::GetRelativeToCurrentCell(const int relative[NDIM]) const
    236236{
    237237  if (CheckBounds(relative)) {
     
    247247 * \return if the atom is also found in this cell - true, else - false
    248248 */
    249 bool LinkedCell::SetIndexToNode(const TesselPoint *Walker)
     249bool LinkedCell::SetIndexToNode(const TesselPoint * const Walker) const
    250250{
    251251  bool status = false;
     
    268268 * \param *upper upper bounds
    269269 */
    270 void LinkedCell::GetNeighbourBounds(int lower[NDIM], int upper[NDIM])
     270void LinkedCell::GetNeighbourBounds(int lower[NDIM], int upper[NDIM]) const
    271271{
    272272  for (int i=0;i<NDIM;i++) {
     
    288288 * \return Vector is inside bounding box - true, else - false
    289289 */
    290 bool LinkedCell::SetIndexToVector(const Vector *x)
     290bool LinkedCell::SetIndexToVector(const Vector * const x) const
    291291{
    292292  bool status = true;
Note: See TracChangeset for help on using the changeset viewer.