diff 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
line wrap: on
line diff
--- a/Discovery/Src/check_warning.c	Sat Apr 27 09:32:16 2019 +0200
+++ b/Discovery/Src/check_warning.c	Sat Apr 27 12:27:46 2019 +0200
@@ -61,14 +61,7 @@
 
 void check_warning(void)
 {
-	SDiveState * pDiveState;
-
-	if(stateUsed == stateRealGetPointer())
-		pDiveState = stateRealGetPointerWrite();
-	else
-		pDiveState = stateSimGetPointerWrite();
-
-  check_warning2(pDiveState);
+  check_warning2(stateUsedWrite);
 }