| 1 | #include "SimulationParameters.h" |
| 2 | |
| 3 | bool SimulationParameters::operator==(SimulationParameters const& other) const |
| 4 | { |
| 5 | if (motionType != other.motionType) { |
| 6 | return false; |
| 7 | } |
| 8 | if (motionType == MotionType_Fluid) { |
| 9 | if (motionData.fluidMotion != other.motionData.fluidMotion) { |
| 10 | return false; |
| 11 | } |
| 12 | } |
| 13 | if (motionType == MotionType_Collision) { |
| 14 | if (motionData.collisionMotion != other.motionData.collisionMotion) { |
| 15 | return false; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | for (int i = 0, j = sizeof(Char64) / sizeof(char); i < j; ++i) { |
| 20 | if (projectName[i] != other.projectName[i]) { |
| 21 | return false; |
| 22 | } |
| 23 | if (projectName[i] == '\0') { |
| 24 | break; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | for (int i = 0; i < MAX_COLORS; ++i) { |
| 29 | if (cellMaxBindingDistance[i] != other.cellMaxBindingDistance[i]) { |
| 30 | return false; |
| 31 | } |
| 32 | if (externalEnergyBackflowFactor[i] != other.externalEnergyBackflowFactor[i]) { |
| 33 | return false; |
| 34 | } |
| 35 | if (radiationAbsorptionHighVelocityPenalty[i] != other.radiationAbsorptionHighVelocityPenalty[i]) { |
| 36 | return false; |
| 37 | } |
| 38 | if (particleSplitEnergy[i] != other.particleSplitEnergy[i]) { |
| 39 | return false; |
| 40 | } |
| 41 | if (cellFunctionAttackerSensorDetectionFactor[i] != other.cellFunctionAttackerSensorDetectionFactor[i]) { |
| 42 | return false; |
| 43 | } |
| 44 | if (externalEnergyConditionalInflowFactor[i] != other.externalEnergyConditionalInflowFactor[i]) { |
| 45 | return false; |
| 46 | } |
| 47 | if (cellMaxAge[i] != other.cellMaxAge[i]) { |
| 48 | return false; |
| 49 | } |
| 50 | if (radiationAbsorptionLowConnectionPenalty[i] != other.radiationAbsorptionLowConnectionPenalty[i]) { |
| 51 | return false; |
| 52 | } |
| 53 | if (cellFunctionInjectorRadius[i] != other.cellFunctionInjectorRadius[i]) { |
| 54 | return false; |
| 55 | } |
| 56 | if (cellFunctionDefenderAgainstAttackerStrength[i] != other.cellFunctionDefenderAgainstAttackerStrength[i]) { |
| 57 | return false; |
| 58 | } |
| 59 | if (cellFunctionDefenderAgainstInjectorStrength[i] != other.cellFunctionDefenderAgainstInjectorStrength[i]) { |
| 60 | return false; |
nothing calls this directly
no outgoing calls
no test coverage detected