Ignore:
Timestamp:
Apr 22, 2010, 2:00:03 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
423c7b
Parents:
c43766
Message:

Huge change: Log() << Verbose(.) --> DoLog(.) && (Log() << Verbose(.) << ...);

Most of the files are affected, but this is necessary as if DoLog() says verbosity is not enough, all the stream operators won"t get executed which saves substantial amount of computation time.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/stackclass.hpp

    rc43766 r1f2e46  
    130130{
    131131  bool found = false;
    132   Log() << Verbose(5) << "First " << CurrentFirstEntry<< "\tLast " << CurrentLastEntry<< "\tNext " << NextFreeField<< "\tCount " << EntryCount<< "." << endl;
     132  DoLog(5) && (Log() << Verbose(5) << "First " << CurrentFirstEntry<< "\tLast " << CurrentLastEntry<< "\tNext " << NextFreeField<< "\tCount " << EntryCount<< "." << endl);
    133133  int i=CurrentFirstEntry;
    134134  if (!IsEmpty())
    135135    do {
    136136      if (StackList[i] == ptr) {  // if item found, remove
    137         Log() << Verbose(5) << "Item " << *ptr << " was number " << i << " on stack, removing it." << endl;
     137        DoLog(5) && (Log() << Verbose(5) << "Item " << *ptr << " was number " << i << " on stack, removing it." << endl);
    138138        found = true;
    139139        StackList[i] = NULL;
     
    141141      if ((found) && (StackList[i] != NULL)) {  // means we have to shift (and not the removed item)
    142142        if (i == 0) { // we are down to first item in stack, have to put onto last item
    143           Log() << Verbose(5) << "Shifting item 0 to place " << EntryCount-1 << "." << endl;
     143          DoLog(5) && (Log() << Verbose(5) << "Shifting item 0 to place " << EntryCount-1 << "." << endl);
    144144          StackList[EntryCount-1] = StackList[0];
    145145        } else {
    146           Log() << Verbose(5) << "Shifting item " << i << " to place " << i-1 << "." << endl;
     146          DoLog(5) && (Log() << Verbose(5) << "Shifting item " << i << " to place " << i-1 << "." << endl);
    147147          StackList[i-1] = StackList[i];
    148148        }
Note: See TracChangeset for help on using the changeset viewer.