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