Index: sources/model/dg/adjustment/settings/MAdjustDGCleaningUsageResponse.cpp =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -ra09c1a91b8eaf9d7164ba7f274d4ccd557c05f22 --- sources/model/dg/adjustment/settings/MAdjustDGCleaningUsageResponse.cpp (.../MAdjustDGCleaningUsageResponse.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/model/dg/adjustment/settings/MAdjustDGCleaningUsageResponse.cpp (.../MAdjustDGCleaningUsageResponse.cpp) (revision a09c1a91b8eaf9d7164ba7f274d4ccd557c05f22) @@ -33,27 +33,23 @@ bool MAdjustDGCleaningUsageResponse::fromByteArray(const QByteArray &vByteArray, int *vIndex) { int index = 0; // message data start position - if (GetValue(vByteArray, index, _data.mRoWaterGenTotalL )) - if (GetValue(vByteArray, index, _data.mRoWaterGenSinceLastServiceL )) - if (GetValue(vByteArray, index, _data.mLastBasicFlushCompleteDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastChemDisStartDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastChemDisCompleteDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastChemDisFlushCompleteDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastHeatDisCompleteDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastHeatActiveCoolCompleteDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastFilterFlushCompleteDateEpoch )) - if (GetValue(vByteArray, index, _data.mLastResetTimeEpoch )) - return true ; - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } - else { if(vIndex) *vIndex = index; return false; } + if ( ! GetValue(vByteArray, index, _data.mRoWaterGenTotalL )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mRoWaterGenSinceLastServiceL )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastBasicFlushCompleteDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastChemDisStartDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastChemDisCompleteDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastChemDisFlushCompleteDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastHeatDisCompleteDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastHeatActiveCoolCompleteDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastFilterFlushCompleteDateEpoch )) goto lError; + if ( ! GetValue(vByteArray, index, _data.mLastResetTimeEpoch )) goto lError; + + return true ; + +lError: + if(vIndex) { *vIndex = index; } + + return false ; } /*!