From 6ce68c5270b0b2a18953dd73a63f2a4630d77d84 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Mon, 18 Nov 2024 12:44:49 +0000
Subject: [PATCH] MNT: Don't pass a value to NoOfThreads, so that it will use a
 default value

---
 SpMat.h           | 8 ++++----
 bfmatrix.h        | 6 +++---
 splinterpolator.h | 4 ++--
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/SpMat.h b/SpMat.h
index 8a4ad59..282f82c 100644
--- a/SpMat.h
+++ b/SpMat.h
@@ -93,10 +93,10 @@ class SpMat
 {
 public:
   SpMat() : _m(0), _n(0), _nz(0), _ri(0), _val(0), _pw(false), _nt(1) {}
-  SpMat(unsigned int m, unsigned int n, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1)) : _m(m), _n(n), _nz(0), _ri(n), _val(n), _pw(false), _nt(nt._n) {}
-  SpMat(unsigned int m, unsigned int n, const unsigned int *irp, const unsigned int *jcp, const double *sp, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1));
-  SpMat(const NEWMAT::GeneralMatrix& M, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1));
-  SpMat(const std::string& fname, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1));
+  SpMat(unsigned int m, unsigned int n, Utilities::NoOfThreads nt=Utilities::NoOfThreads()) : _m(m), _n(n), _nz(0), _ri(n), _val(n), _pw(false), _nt(nt._n) {}
+  SpMat(unsigned int m, unsigned int n, const unsigned int *irp, const unsigned int *jcp, const double *sp, Utilities::NoOfThreads nt=Utilities::NoOfThreads());
+  SpMat(const NEWMAT::GeneralMatrix& M, Utilities::NoOfThreads nt=Utilities::NoOfThreads());
+  SpMat(const std::string& fname, Utilities::NoOfThreads nt=Utilities::NoOfThreads());
   ~SpMat() {}
 
   unsigned int Nrows() const {return(_m);}
diff --git a/bfmatrix.h b/bfmatrix.h
index 28af88c..3781856 100644
--- a/bfmatrix.h
+++ b/bfmatrix.h
@@ -141,13 +141,13 @@ public:
   // Constructors, destructor and assignment
   SparseBFMatrix()
   : mp(std::shared_ptr<MISCMATHS::SpMat<T> >(new MISCMATHS::SpMat<T>())) {}
-  SparseBFMatrix(unsigned int m, unsigned int n, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1))
+  SparseBFMatrix(unsigned int m, unsigned int n, Utilities::NoOfThreads nt=Utilities::NoOfThreads())
   : mp(std::shared_ptr<MISCMATHS::SpMat<T> >(new MISCMATHS::SpMat<T>(m,n,nt))) {}
-  SparseBFMatrix(unsigned int m, unsigned int n, const unsigned int *irp, const unsigned int *jcp, const double *sp, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1))
+  SparseBFMatrix(unsigned int m, unsigned int n, const unsigned int *irp, const unsigned int *jcp, const double *sp, Utilities::NoOfThreads nt=Utilities::NoOfThreads())
   : mp(std::shared_ptr<MISCMATHS::SpMat<T> >(new MISCMATHS::SpMat<T>(m,n,irp,jcp,sp,nt))) {}
   SparseBFMatrix(const MISCMATHS::SpMat<T>& M)
   : mp(std::shared_ptr<MISCMATHS::SpMat<T> >(new MISCMATHS::SpMat<T>(M))) {}
-  SparseBFMatrix(const NEWMAT::Matrix& M, Utilities::NoOfThreads nt=Utilities::NoOfThreads(1))
+  SparseBFMatrix(const NEWMAT::Matrix& M, Utilities::NoOfThreads nt=Utilities::NoOfThreads())
   : mp(std::shared_ptr<MISCMATHS::SpMat<T> >(new MISCMATHS::SpMat<T>(M,nt))) {}
   SparseBFMatrix(const SparseBFMatrix<T>& M)
   : mp(std::shared_ptr<MISCMATHS::SpMat<T> >(new MISCMATHS::SpMat<T>(*(M.mp)))) {}
diff --git a/splinterpolator.h b/splinterpolator.h
index 6d94b11..c9e24f9 100644
--- a/splinterpolator.h
+++ b/splinterpolator.h
@@ -59,7 +59,7 @@ public:
                   const std::vector<ExtrapolationType>& et,
                   unsigned int order=3,
                   bool copy_low_order=true,
-                  Utilities::NoOfThreads nthr=Utilities::NoOfThreads(1),
+                  Utilities::NoOfThreads nthr=Utilities::NoOfThreads(),
                   double prec=1e-8,
                   bool data_are_coefs=false)
     : _valid(false), _own_coef(false), _coef(0), _cptr(0), _ndim(0), _nthr(nthr._n)
@@ -71,7 +71,7 @@ public:
                   ExtrapolationType et=Zeros,
                   unsigned int order=3,
                   bool copy_low_order=true,
-                  Utilities::NoOfThreads nthr=Utilities::NoOfThreads(1),
+                  Utilities::NoOfThreads nthr=Utilities::NoOfThreads(),
                   double prec=1e-8,
                   bool data_are_coefs=false)
     : _valid(false), _own_coef(false), _coef(0), _cptr(0), _ndim(0), _nthr(nthr._n)
-- 
GitLab