comparison Discovery/Src/check_warning.c @ 272:74a8296a2318 write-from-sim

cleanup: simplify stateUsed usage Get rid of some local stateUsed pointers used to differentiate between normal dive and simulator mode. Simply use the (properly set) global data for this. Its rather useless to do this test on countless locations. Trivial cleanup. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Sat, 27 Apr 2019 12:27:46 +0200
parents 1b9847d40e81
children 58200d756365
comparison
equal deleted inserted replaced
271:1303747b5ba2 272:74a8296a2318
59 59
60 /* Exported functions --------------------------------------------------------*/ 60 /* Exported functions --------------------------------------------------------*/
61 61
62 void check_warning(void) 62 void check_warning(void)
63 { 63 {
64 SDiveState * pDiveState; 64 check_warning2(stateUsedWrite);
65
66 if(stateUsed == stateRealGetPointer())
67 pDiveState = stateRealGetPointerWrite();
68 else
69 pDiveState = stateSimGetPointerWrite();
70
71 check_warning2(pDiveState);
72 } 65 }
73 66
74 67
75 void check_warning2(SDiveState * pDiveState) 68 void check_warning2(SDiveState * pDiveState)
76 { 69 {