WSL/SLF GitLab Repository

Commit 1cc71d4c authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Reverting a change that made reading SMET files impossible with OpenMP....

Reverting a change that made reading SMET files impossible with OpenMP. Pushing up version number to 2.4.2. Properly restoring ostream parameters before returning (in libinterpol1D, thanks to Coverity).
parent a36702fe
......@@ -6,7 +6,7 @@ PROJECT(meteoio)
# Version of library
SET(VERSION_MAJOR 2 CACHE INTERNAL "")
SET(VERSION_MINOR 4 CACHE INTERNAL "")
SET(VERSION_PATCH 1 CACHE INTERNAL "")
SET(VERSION_PATCH 2 CACHE INTERNAL "")
SET(POPCC popcc)
SET(LIBPREFIX "lib") #make sure ALL plugins are libXXX for ALL plateforms
......
......@@ -560,6 +560,7 @@ void Interpol1D::NoisyLinRegression(const std::vector<double>& in_X, const std::
//check if r is reasonnable
if (R<r_thres) {
mesg << "[W] Poor regression coefficient: " << std::setprecision(4) << R << "\n";
mesg.copyfmt(std::ios(NULL)); //restore precision
}
}
......
......@@ -26,8 +26,6 @@ using namespace smet; //HACK POPC
namespace smet {
const std::string SMETCommon::smet_version = "1.1";
char* SMETCommon::conversion_end = NULL;
double SMETCommon::conversion_value = 0.0;
set<string> SMETCommon::all_mandatory_header_keys = set<std::string>();
set<string> SMETCommon::all_optional_header_keys = set<std::string>();
set<string> SMETCommon::all_decimal_header_values = set<std::string>();
......@@ -84,7 +82,8 @@ bool SMETCommon::initStaticData()
double SMETCommon::convert_to_double(const std::string& in_string)
{
conversion_value = strtod(in_string.c_str(), &conversion_end);
char* conversion_end = NULL;
const double conversion_value = strtod(in_string.c_str(), &conversion_end);
if (*conversion_end == '\0') {
return conversion_value;
......
......@@ -83,8 +83,6 @@ class SMETCommon {
private:
static const bool __init; ///<helper variable to enable the init of static collection data
static bool initStaticData(); ///<initialize the static collections
static char* conversion_end;
static double conversion_value;
};
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment