Ignore:
Timestamp:
May 23, 2008, 9:17:19 AM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
6145aa7
Parents:
6c96f4
Message:

Lots of for loops now count in reverse order where it does not matter, some 3 -> NDIM

for(i=0;i<var;i++) is slower than for (i=var;i--;) if the order of the i's is not important (note: i-- is also a value and it stops when on i == 0 automatically)
in builder.cpp there were some remnant 3 actually meant to be NDIM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/helpers.hpp

    r6c96f4 rf75030  
    266266  int i;
    267267  if (ptr != NULL) {
    268     for(i=0;i<dim;i++)
     268    for(i=dim;i--;)
    269269      if (ptr[i] != NULL)
    270270        free(ptr[i]);
Note: See TracChangeset for help on using the changeset viewer.