Index: cpp/common/Convert.cpp
===================================================================
--- cpp/common/Convert.cpp	(revision 1004)
+++ cpp/common/Convert.cpp	(revision 1005)
@@ -4,5 +4,4 @@
 
 #include "Convert.h"
-
 #include <sstream>
 
@@ -91,5 +90,5 @@
 	struct tm ret;
 #if defined LINUX // || android?
-	return *::localtime_r(&timep,&ret);
+	return *::localtime_r(&timep, &ret);
 #elif defined _WIN32 && !defined __BORLANDC__
 	::localtime_s(&ret, &timep);
@@ -97,5 +96,5 @@
 #else //borland?
 	pthread_mutex_lock(&fix_unsafe_mutex);
-	ret=*::localtime(&timep);
+	ret = *::localtime(&timep);
 	pthread_mutex_unlock(&fix_unsafe_mutex);
 	return ret;
@@ -110,5 +109,5 @@
 #ifndef MULTITHREADED
 
-	ret=::asctime(&tm);
+	ret = ::asctime(&tm);
 
 #else //MULTITHREADED
@@ -116,5 +115,5 @@
 	char buf[26];
 #if defined LINUX // || android?
-	ret=::asctime_r(&tm,buf);
+	ret = ::asctime_r(&tm, buf);
 #elif defined _WIN32 && !defined __BORLANDC__
 	asctime_s(buf, sizeof(buf), &tm);
@@ -122,6 +121,6 @@
 #else //borland?
 	pthread_mutex_lock(&fix_unsafe_mutex);
-	strcpy(buf,::asctime(&tm));
-	ret=buf;
+	strcpy(buf, ::asctime(&tm));
+	ret = buf;
 	pthread_mutex_unlock(&fix_unsafe_mutex);
 #endif
Index: cpp/common/Convert.h
===================================================================
--- cpp/common/Convert.h	(revision 1004)
+++ cpp/common/Convert.h	(revision 1005)
@@ -11,4 +11,5 @@
 #include "2d.h"
 #include <stdint.h>
+#include <cmath>
 
 
@@ -39,5 +40,5 @@
 	static uint32_t hexToInt(const string& col);
 
-	static double toRadians(double angle) { return angle*M_PI / 180; }
+	static double toRadians(double angle) { return angle * M_PI / 180; }
 	static double toDegrees(double angle) { return angle / M_PI * 180; }
 	static double atan_2(double y, double x) { if (x == 0 && y == 0) return 0; else return atan2(y, x); } //needed by borland 5/6 only?
@@ -46,5 +47,5 @@
 	{
 		double dx = x2 - x1, dy = y2 - y1;
-		return dx*dx + dy*dy;
+		return dx * dx + dy * dy;
 	}
 	static double odleglosc_sq(const Pt2D& p1, const Pt2D& p2) //odleglosc do kwadratu
@@ -53,5 +54,5 @@
 	}
 
-	static double odleglosc(double x1, double y1, double x2, double y2)	{ return sqrt(odleglosc_sq(x1, y1, x2, y2)); }
+	static double odleglosc(double x1, double y1, double x2, double y2) { return sqrt(odleglosc_sq(x1, y1, x2, y2)); }
 	static double odleglosc(const Pt2D& p1, const Pt2D& p2)
 	{
Index: cpp/common/random.h
===================================================================
--- cpp/common/random.h	(revision 1004)
+++ cpp/common/random.h	(revision 1005)
@@ -6,7 +6,7 @@
 
 #ifdef _MSC_VER
- #define NOMINMAX //we don't want Windows headers (minwindef.h) to define min() and max() as macros
- #undef min //for some reason, NOMINMAX did not work so we have to #undef anyway
- #undef max
+#define NOMINMAX //we don't want Windows headers (minwindef.h) to define min() and max() as macros
+#undef min //for some reason, NOMINMAX did not work so we have to #undef anyway
+#undef max
 #endif
 
@@ -14,15 +14,15 @@
 #include <stdint.h> //uintptr_t
 #ifdef MULTITHREADED
- #include "threads.h"
+#include "threads.h"
 #endif
 #ifdef LINUX
- #include <unistd.h>
- #include <sys/stat.h>
- #include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <fcntl.h>
 #endif
 #ifdef _WIN32
- #define _WINSOCKAPI_ //http://stackoverflow.com/questions/1372480/c-redefinition-header-files
- #include <rpc.h> //UUID
- #pragma comment(lib, "Rpcrt4.lib")
+#define _WINSOCKAPI_ //http://stackoverflow.com/questions/1372480/c-redefinition-header-files
+#include <rpc.h> //UUID
+#pragma comment(lib, "Rpcrt4.lib")
 #endif
 
@@ -63,5 +63,5 @@
 		mt[0] = seed;
 		for (unsigned int i = 1; i < length; i++)
-			mt[i] = (1812433253 * (mt[i - 1] ^ (mt[i - 1] >> 30)) + i)&bitMask_32;
+			mt[i] = (1812433253 * (mt[i - 1] ^ (mt[i - 1] >> 30)) + i) & bitMask_32;
 #ifdef MULTITHREADED
 		pthread_mutex_unlock(&lock);
@@ -74,8 +74,8 @@
 		//for ms visual, could use http://msdn.microsoft.com/en-us/library/sxtz2fa8.aspx
 #ifdef LINUX
-		int fd=open("/dev/urandom",O_RDONLY);
-		if (fd>=0)
+		int fd = open("/dev/urandom", O_RDONLY);
+		if (fd >= 0)
 		{
-			read(fd,&seed,sizeof(seed));
+			read(fd, &seed, sizeof(seed));
 			close(fd);
 		}
@@ -84,5 +84,5 @@
 		{
 			counter++;
-			seed = (unsigned int)time(NULL);                         //time (seconds); could use hi-res timer but then we would depend on common/timer.h
+			seed = (unsigned int)time(NULL);           //time (seconds); could use hi-res timer but then we would depend on common/timer.h
 			seed ^= counter;                           //incremented value, possibly randomly initialized
 			seed ^= (unsigned int)(uintptr_t)&counter; //memory address
@@ -91,5 +91,5 @@
 		UUID uuid;
 		::UuidCreate(&uuid);
-		seed ^= uuid.Data1^uuid.Data2^uuid.Data3^uuid.Data4[0];
+		seed ^= uuid.Data1 ^ uuid.Data2 ^ uuid.Data3 ^ uuid.Data4[0];
 #endif
 		setSeed(seed);
@@ -117,7 +117,7 @@
 	//UniformRandomBitGenerator
 	typedef unsigned int result_type;
-	static constexpr unsigned int min() {return 0;}
-	static constexpr unsigned int max() {return MAXVALUE;}
-	inline unsigned int operator()() {return getUint32();}
+	static constexpr unsigned int min() { return 0; }
+	static constexpr unsigned int max() { return MAXVALUE; }
+	inline unsigned int operator()() { return getUint32(); }
 
 	inline double getDouble() // [0,1)
Index: cpp/frams/_demos/simil_test.cpp
===================================================================
--- cpp/frams/_demos/simil_test.cpp	(revision 1004)
+++ cpp/frams/_demos/simil_test.cpp	(revision 1005)
@@ -19,5 +19,4 @@
 {
 	LoggerToStdout messages_to_stdout(LoggerBase::Enable);
-	typedef double *pDouble;
 	int iCurrParam = 0; // index of the currently processed parameter
 	char *szCurrParam = NULL;
@@ -172,6 +171,6 @@
 	double **aaSimil = NULL; // array of similarities
 
-	// create the empty array of similarities
-	aaSimil = new pDouble[pvGenos.size()];
+	// create an empty array of similarities
+	aaSimil = new double*[pvGenos.size()];
 	for (unsigned int k = 0; k < pvGenos.size(); k++)
 	{
@@ -181,5 +180,5 @@
 	}
 
-	// compute and remember similarities
+	// compute and store similarities
 	for (unsigned int i = 0; i < pvGenos.size(); i++)
 	{
@@ -193,5 +192,5 @@
 	if (bPrintNames)
 	{
-		// if "-names" switch was given, print the number of genotypes and their names
+		// if the "-names" switch was given, print the number of genotypes and their names
 		printf("%li\n", pvGenos.size());
 		for (unsigned int iGen = 0; iGen < pvNames.size(); iGen++)
Index: cpp/frams/genetics/f9/f9_oper.cpp
===================================================================
--- cpp/frams/genetics/f9/f9_oper.cpp	(revision 1004)
+++ cpp/frams/genetics/f9/f9_oper.cpp	(revision 1005)
@@ -6,4 +6,5 @@
 #include "f9_conv.h"
 #include <common/nonstd.h> //rndUint, rndDouble
+#include <string.h>
 
 
Index: cpp/frams/param/paramobj.cpp
===================================================================
--- cpp/frams/param/paramobj.cpp	(revision 1004)
+++ cpp/frams/param/paramobj.cpp	(revision 1005)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -6,5 +6,5 @@
 #include <frams/util/extvalue.h>
 #include <common/nonstd_stl.h>
-
+	
 static const char* maybedup(bool dup, const char* src)
 {
Index: cpp/frams/util/extvalue.cpp
===================================================================
--- cpp/frams/util/extvalue.cpp	(revision 1004)
+++ cpp/frams/util/extvalue.cpp	(revision 1005)
@@ -705,5 +705,5 @@
 		fpExceptDisable();
 		double tmp = getDouble() / a;
-		if (!finite(tmp))
+		if (!std::isfinite(tmp))
 		{
 			logPrintf("ExtValue", "divide", LOG_ERROR, "Overflow %s/%g", getString().c_str(), a); setInvalid();
