From 34edabbf495e0222c59937973ab2bfecc8e32dd6 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 14 Nov 2008 23:03:36 +0000 Subject: Remove adjust struct member in favor of a local static variable git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@44 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- neural.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'neural.c') diff --git a/neural.c b/neural.c index 5b443d3..ff418ad 100644 --- a/neural.c +++ b/neural.c @@ -121,6 +121,7 @@ DoNNET(void) NNetStruct* locnnetstruct = &global_nnetstruct; clock_t total_time = 0; int iterations = 0; + static int is_adjusted = FALSE; /* ** Init random number generator. @@ -144,8 +145,8 @@ DoNNET(void) /* ** See if we need to perform self adjustment loop. */ - if (locnnetstruct->adjust == FALSE) { - locnnetstruct->adjust = TRUE; + if (is_adjusted == FALSE) { + is_adjusted = TRUE; /* ** Do self-adjustment. This involves initializing the ** # of loops and increasing the loop count until we -- cgit v1.2.3