From a9ef270e9b752c339e582eed3ae4b29005cf91ad Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 9 Oct 2018 13:11:42 +0800 Subject: src/{v,}chisq: Fix uninitialized variables --- src/chisq.hpp | 2 +- src/vchisq.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chisq.hpp b/src/chisq.hpp index 0e58200..a77e882 100644 --- a/src/chisq.hpp +++ b/src/chisq.hpp @@ -47,7 +47,6 @@ namespace opt_utilities private: bool verb; bool limit_bound; - int n; statistic* do_clone()const { @@ -100,6 +99,7 @@ namespace opt_utilities std::vector vye2; std::vector my; float xmin=1e99,xmax=-1e99,ymin=1e99,ymax=-1e99; + int n=0; if(verb) { n++; diff --git a/src/vchisq.hpp b/src/vchisq.hpp index 8cd8481..034086e 100644 --- a/src/vchisq.hpp +++ b/src/vchisq.hpp @@ -26,7 +26,6 @@ namespace opt_utilities { private: bool verb; - int n; bool limit_bound; typedef std::vector Tp; @@ -75,6 +74,7 @@ namespace opt_utilities std::vector vye; std::vector my; float x1=1e99,x2=-1e99,y1=1e99,y2=-1e99; + int n=0; if(verb) { n++; -- cgit v1.2.2