| 134 | } |
| 135 | |
| 136 | std::string LocationHelper::generateSourceName(SimulationParameters& parameters) |
| 137 | { |
| 138 | int counter = 0; |
| 139 | bool alreadyUsed; |
| 140 | std::string result; |
| 141 | do { |
| 142 | alreadyUsed = false; |
| 143 | result = "Radiation " + std::to_string(++counter); |
| 144 | for (int i = 0; i < parameters.numRadiationSources; ++i) { |
| 145 | auto name = std::string(parameters.radiationSource[i].name); |
| 146 | if (result == name) { |
| 147 | alreadyUsed = true; |
| 148 | break; |
| 149 | } |
| 150 | } |
| 151 | } while (alreadyUsed); |
| 152 | |
| 153 | return result; |
| 154 | } |
nothing calls this directly
no test coverage detected