Changes in src/helpers.hpp [e138de:a67d19]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/helpers.hpp
re138de ra67d19 76 76 }; 77 77 78 /** returns greater of the two values. 79 * \param x first value 80 * \param y second value 81 * \return greater of the two (by operator>()) 82 */ 83 template <typename T> T Max(T x, T y) 84 { 85 if (x > y) 86 return x; 87 else return y; 88 }; 89 90 /** returns smaller of the two values. 91 * \param x first value 92 * \param y second value 93 * \return smaller of the two (by operator<()) 94 */ 95 template <typename T> T Min(T x, T y) 96 { 97 if (x < y) 98 return x; 99 else return y; 100 }; 101 78 102 /** Creates a lookup table for true father's Atom::Nr -> atom ptr. 79 103 * \param *start begin of chain list … … 90 114 91 115 if (LookupTable != NULL) { 92 Log() << Verbose(0) << "Pointer for Lookup table is not NULL! Aborting ..." <<endl;116 DoLog(0) && (Log() << Verbose(0) << "Pointer for Lookup table is not NULL! Aborting ..." <<endl); 93 117 return false; 94 118 } … … 103 127 } 104 128 if (count <= 0) { 105 Log() << Verbose(0) << "Count of lookup list is 0 or less." << endl;129 DoLog(0) && (Log() << Verbose(0) << "Count of lookup list is 0 or less." << endl); 106 130 return false; 107 131 } … … 110 134 LookupTable = Calloc<T*>(count, "CreateFatherLookupTable - **LookupTable"); 111 135 if (LookupTable == NULL) { 112 eLog() << Verbose(0) << "LookupTable memory allocation failed!" << endl; 136 DoeLog(0) && (eLog()<< Verbose(0) << "LookupTable memory allocation failed!" << endl); 137 performCriticalExit(); 113 138 status = false; 114 139 } else { … … 121 146 LookupTable[AtomNo] = Walker; 122 147 } else { 123 Log() << Verbose(0) << "Walker " << *Walker << " exceeded range of nuclear ids [0, " << count << ")." << endl;148 DoLog(0) && (Log() << Verbose(0) << "Walker " << *Walker << " exceeded range of nuclear ids [0, " << count << ")." << endl); 124 149 status = false; 125 150 break;
Note:
See TracChangeset
for help on using the changeset viewer.