Index: cpp/frams/_demos/f0_variants_test.cpp
===================================================================
--- cpp/frams/_demos/f0_variants_test.cpp	(revision 955)
+++ cpp/frams/_demos/f0_variants_test.cpp	(revision 972)
@@ -1,4 +1,4 @@
 // This file is a part of Framsticks SDK.  http://www.framsticks.com/
-// Copyright (C) 1999-2016  Maciej Komosinski and Szymon Ulatowski.
+// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
 // See LICENSE.txt for details.
 
@@ -12,110 +12,110 @@
 #include <common/loggers/loggertostdout.h>
 
-void save_as_f0(SString &gen,Model &m,bool omit_default_values)
+void save_as_f0(SString &gen, Model &m, bool omit_default_values)
 {
-// copied from Model::makeGeno() (with small changes)
+	// copied from Model::makeGeno() (with small changes)
 
-static Param modelparam(f0_model_paramtab);
-static Param partparam(f0_part_paramtab);
-static Param jointparam(f0_joint_paramtab);
-static Param neuroparam(f0_neuro_paramtab);
-static Param connparam(f0_neuroconn_paramtab);
+	static Param modelparam(f0_model_paramtab);
+	static Param partparam(f0_part_paramtab);
+	static Param jointparam(f0_joint_paramtab);
+	static Param neuroparam(f0_neuro_paramtab);
+	static Param connparam(f0_neuroconn_paramtab);
 
-static Part defaultpart;
-static Joint defaultjoint;
-static Neuro defaultneuro;
-static Model defaultmodel;
-static NeuroConn defaultconn;
+	static Part defaultpart;
+	static Joint defaultjoint;
+	static Neuro defaultneuro;
+	static Model defaultmodel;
+	static NeuroConn defaultconn;
 
-modelparam.select(&m);
-gen+="m:";
-modelparam.saveSingleLine(gen,omit_default_values ? &defaultmodel : NULL);
+	modelparam.select(&m);
+	gen += "m:";
+	modelparam.saveSingleLine(gen, omit_default_values ? &defaultmodel : NULL);
 
-Part *p;
-Joint *j;
-Neuro *n;
+	Part *p;
+	Joint *j;
+	Neuro *n;
 
-for (int i=0;p=(Part*)m.getPart(i);i++)
+	for (int i = 0; p = (Part*)m.getPart(i); i++)
 	{
-	partparam.select(p);
-	gen+="p:";
-	partparam.saveSingleLine(gen,omit_default_values ? &defaultpart : NULL);
+		partparam.select(p);
+		gen += "p:";
+		partparam.saveSingleLine(gen, omit_default_values ? &defaultpart : NULL);
 	}
-for (int i=0;j=(Joint*)m.getJoint(i);i++)
+	for (int i = 0; j = (Joint*)m.getJoint(i); i++)
 	{
-	jointparam.select(j);
-	jointparam.setParamTab(j->usedelta?f0_joint_paramtab:f0_nodeltajoint_paramtab);
-	gen+="j:";
-	jointparam.saveSingleLine(gen,omit_default_values ? &defaultjoint : NULL);
+		jointparam.select(j);
+		jointparam.setParamTab(j->usedelta ? f0_joint_paramtab : f0_nodeltajoint_paramtab);
+		gen += "j:";
+		jointparam.saveSingleLine(gen, omit_default_values ? &defaultjoint : NULL);
 	}
-for (int i=0;n=(Neuro*)m.getNeuro(i);i++)
+	for (int i = 0; n = (Neuro*)m.getNeuro(i); i++)
 	{
-	neuroparam.select(n);
-	gen+="n:";
-	neuroparam.saveSingleLine(gen,omit_default_values ? &defaultneuro : NULL);
+		neuroparam.select(n);
+		gen += "n:";
+		neuroparam.saveSingleLine(gen, omit_default_values ? &defaultneuro : NULL);
 	}
-for (int a=0;n=(Neuro*)m.getNeuro(a);a++)
+	for (int a = 0; n = (Neuro*)m.getNeuro(a); a++)
 	{ // inputs
-	for (int b=0;b<n->getInputCount();b++)
+		for (int b = 0; b < n->getInputCount(); b++)
 		{
-		double w;
-		NeuroConn nc;
-		Neuro* n2=n->getInput(b,w);
-		nc.n1_refno=n->refno; nc.n2_refno=n2->refno;
-		nc.weight=w;
-		nc.info=n->getInputInfo(b);
-		connparam.select(&nc);
-		gen+="c:";
-		connparam.saveSingleLine(gen,omit_default_values ? &defaultconn : NULL);
+			double w;
+			NeuroConn nc;
+			Neuro* n2 = n->getInput(b, w);
+			nc.n1_refno = n->refno; nc.n2_refno = n2->refno;
+			nc.weight = w;
+			nc.info = n->getInputInfo(b);
+			connparam.select(&nc);
+			gen += "c:";
+			connparam.saveSingleLine(gen, omit_default_values ? &defaultconn : NULL);
 		}
 	}
 }
 
-int main(int argc,char*argv[])
+int main(int argc, char*argv[])
 {
-LoggerToStdout messages_to_stdout(LoggerBase::Enable);
+	LoggerToStdout messages_to_stdout(LoggerBase::Enable);
 
-//without converters the application would only handle "format 0" genotypes
-DefaultGenoConvManager gcm;
-gcm.addDefaultConverters();
-Geno::useConverters(&gcm);
+	//without converters the application would only handle "format 0" genotypes
+	DefaultGenoConvManager gcm;
+	gcm.addDefaultConverters();
+	Geno::useConverters(&gcm);
 
-Geno::Validators validators;
-Geno::useValidators(&validators);
-ModelGenoValidator model_validator;
-validators+=&model_validator; //This simple validator handles all cases where a converter for a particular format is available but there is no genetic operator. Converters may be less strict in detecting invalid genotypes but it is better than nothing
+	Geno::Validators validators;
+	Geno::useValidators(&validators);
+	ModelGenoValidator model_validator;
+	validators += &model_validator; //This simple validator handles all cases where a converter for a particular format is available but there is no genetic operator. Converters may be less strict in detecting invalid genotypes but it is better than nothing
 
-SString gen(argc>1?argv[1]:"X[|G:1.23]");
-if (!strcmp(gen.c_str(),"-"))
+	SString gen(argc > 1 ? argv[1] : "X[|G:1.23]");
+	if (!strcmp(gen.c_str(), "-"))
 	{
-	gen=0;
-	StdioFILEDontClose in(stdin);
-	loadSString(&in,gen);
+		gen = 0;
+		StdioFILEDontClose in(stdin);
+		loadSString(&in, gen);
 	}
-Geno g(gen);
-printf("\nSource genotype: '%s'\n",g.getGenes().c_str());
-printf("                  ( format %s %s)\n",
-       g.getFormat().c_str(), g.getComment().c_str());
+	Geno g(gen);
+	printf("\nSource genotype: '%s'\n", g.getGenes().c_str());
+	printf("                  ( format %s %s)\n",
+		g.getFormat().c_str(), g.getComment().c_str());
 
-Model m(g);//.getConverted('0'));
+	Model m(g, Model::SHAPE_UNKNOWN);//.getConverted('0'));
 
-if (!m.isValid())
+	if (!m.isValid())
 	{
-	printf("Cannot build Model from this genotype!\n");
-	return 2;	
+		printf("Cannot build Model from this genotype!\n");
+		return 2;
 	}
 
-printf("\nthis example shows how to save a f0 genotype using low-level ParamInterface::saveSingleLine() calls\n");
+	printf("\nthis example shows how to save a f0 genotype using low-level ParamInterface::saveSingleLine() calls\n");
 
-SString f0_skipping_defaults;
-SString f0_no_skipping_defaults;
+	SString f0_skipping_defaults;
+	SString f0_no_skipping_defaults;
 
-save_as_f0(f0_skipping_defaults,m,true);
-save_as_f0(f0_no_skipping_defaults,m,false);
+	save_as_f0(f0_skipping_defaults, m, true);
+	save_as_f0(f0_no_skipping_defaults, m, false);
 
-printf("\n==== with defdata (skips default values) ======\n%s\n",f0_skipping_defaults.c_str());
-printf("\n==== without defdata (saves all fields) ======\n%s\n",f0_no_skipping_defaults.c_str());
+	printf("\n==== with defdata (skips default values) ======\n%s\n", f0_skipping_defaults.c_str());
+	printf("\n==== without defdata (saves all fields) ======\n%s\n", f0_no_skipping_defaults.c_str());
 
-return 0;
+	return 0;
 }
 
@@ -123,5 +123,5 @@
 
 Source genotype: 'X[|G:1.23]'
-                  ( format 1 )
+				  ( format 1 )
 
 this example shows how to save a f0 genotype using low-level ParamInterface::saveSingleLine() calls
