61 lines
1.9 KiB
Plaintext
61 lines
1.9 KiB
Plaintext
diff -ruN src/include/bit-babbler/impl/log.h src-mod/include/bit-babbler/impl/log.h
|
|
--- src/include/bit-babbler/impl/log.h 2018-02-08 18:05:43.000000000 +0000
|
|
+++ src-mod/include/bit-babbler/impl/log.h 2020-05-10 18:42:06.440000000 +0000
|
|
@@ -294,7 +294,7 @@
|
|
#pragma GCC diagnostic push
|
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
|
|
|
- #if EM_PLATFORM_LINUX
|
|
+ #if EM_PLATFORM_LINUX && defined(__GLIBC__) // not all linuxes use glibc
|
|
|
|
// Querying the string length with a NULL for the output is a GNU extension.
|
|
// The glibc docs specify that behaviour but SUSv4 does not define it.
|
|
diff -ruN src/include/bit-babbler/qa.h src-mod/include/bit-babbler/qa.h
|
|
--- src/include/bit-babbler/qa.h 2018-02-08 18:05:43.000000000 +0000
|
|
+++ src-mod/include/bit-babbler/qa.h 2020-05-11 20:50:26.570000000 +0000
|
|
@@ -436,7 +436,7 @@
|
|
public:
|
|
|
|
// Accumulators
|
|
- size_t bin[ NBINS ];
|
|
+ size_t* bin;
|
|
size_t samples;
|
|
|
|
size_t inradius;
|
|
@@ -464,6 +464,7 @@
|
|
|
|
Data()
|
|
{
|
|
+ bin = new size_t[ NBINS ];
|
|
clear();
|
|
result[MIN].clear( MIN );
|
|
result[MAX].clear( MAX );
|
|
@@ -474,6 +475,7 @@
|
|
, inradius( data["PiIn"]->As<size_t>() )
|
|
, pisamples( data["PiSamples"]->As<size_t>() )
|
|
{ //{{{
|
|
+ bin = new size_t[ NBINS ];
|
|
|
|
Json::Data::Handle binarray = data["Bins"];
|
|
|
|
@@ -497,6 +499,7 @@
|
|
|
|
Data( Results_Only_, const Json::Data::Handle &data )
|
|
{ //{{{
|
|
+ bin = new size_t[ NBINS ];
|
|
|
|
clear();
|
|
samples = data["Samples"]->As<size_t>();
|
|
@@ -508,6 +511,11 @@
|
|
|
|
} //}}}
|
|
|
|
+ ~Data()
|
|
+ { //{{{
|
|
+ delete [] bin;
|
|
+ } //}}}
|
|
+
|
|
|
|
void clear()
|
|
{ //{{{
|