From e5803f94497f784354218c4c463ad05aa8271fb5 Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Mon, 4 Mar 2024 18:42:52 -0700 Subject: [PATCH 1/2] =?UTF-8?q?fixed=20=E2=80=98nullptr=E2=80=99=20was=20n?= =?UTF-8?q?ot=20declared=20in=20this=20scope=20on=20ubuntu-16.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/phreeqcpp/common/Utils.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/phreeqcpp/common/Utils.cxx b/src/phreeqcpp/common/Utils.cxx index 0e8d461a..44f77b17 100644 --- a/src/phreeqcpp/common/Utils.cxx +++ b/src/phreeqcpp/common/Utils.cxx @@ -16,6 +16,10 @@ # define nullptr NULL #endif +#if __cplusplus < 201103L // Check if C++ standard is pre-C++11 +# define nullptr NULL +#endif + #if defined(PHREEQCI_GUI) #ifdef _DEBUG #define new DEBUG_NEW From 5ab544f7caee7ecab426bca9bbf57592cdb0ca6a Mon Sep 17 00:00:00 2001 From: Scott R Charlton Date: Mon, 4 Mar 2024 19:11:28 -0700 Subject: [PATCH 2/2] Try this to fix warning on Darwin --- src/phreeqcpp/common/Utils.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/phreeqcpp/common/Utils.cxx b/src/phreeqcpp/common/Utils.cxx index 44f77b17..6738fa9d 100644 --- a/src/phreeqcpp/common/Utils.cxx +++ b/src/phreeqcpp/common/Utils.cxx @@ -17,7 +17,9 @@ #endif #if __cplusplus < 201103L // Check if C++ standard is pre-C++11 -# define nullptr NULL +# ifndef nullptr +# define nullptr NULL +# endif #endif #if defined(PHREEQCI_GUI)