Index: cpp/frams/genetics/genman.cpp
===================================================================
--- cpp/frams/genetics/genman.cpp	(revision 344)
+++ cpp/frams/genetics/genman.cpp	(revision 348)
@@ -199,5 +199,5 @@
 {
 	SString ggs=g.getGene();
-	const char *gg = ggs;
+	const char *gg = ggs.c_str();
 	GenoOperators *gf = getOper_f(g.getFormat());
 	int check1;
@@ -237,5 +237,5 @@
 	if (gf == NULL)
 		return Geno(SString::empty(), -1, SString::empty(), SString::sprintf("GENOPER_NOOPER: Validate(): don't know how to handle genetic format %c", format));
-	char *g2 = strdup(geny.getGene()); //copy for validation
+	char *g2 = strdup(geny.getGene().c_str()); //copy for validation
 	int res = gf->validate(g2);
 	SString sg2 = g2;
@@ -263,5 +263,5 @@
 	while (!ok)
 	{
-		char *gn = strdup(gv.getGene()); //copy for mutation
+		char *gn = strdup(gv.getGene().c_str()); //copy for mutation
 		chg = 0;
 		if (gf->mutate(gn, chg, method) == GENOPER_OK)
@@ -284,14 +284,14 @@
 		if (!ok && (count - pcount > 100))
 		{
-			FMprintf("GenMan", "Mutate", 2, "Tried 100x and failed: %s", (const char*)g.getGene());
+			FMprintf("GenMan", "Mutate", 2, "Tried 100x and failed: %s", g.getGene().c_str());
 			return Geno("", -1, "", "GENOPER_OPFAIL: Mutate() tried 100x and failed");
 		}
 	}
 	mutchg += chg;
-	if (history) saveLink((const char*)g.getGene(), "", (const char*)gv.getGene(), chg);
+	if (history) saveLink(g.getGene().c_str(), "", gv.getGene().c_str(), chg);
 	SString mutinfo;
-	if (extmutinfo == 0) mutinfo = SString::sprintf("%.2f%% mutation of '%s'", 100 * chg, (const char*)g.getName()); else
-		if (extmutinfo == 1) mutinfo = SString::sprintf("%.2f%% mutation(%d) of '%s'", 100 * chg, method, (const char*)g.getName()); else
-			mutinfo = SString::sprintf("%.2f%% mutation(%s) of '%s'", 100 * chg, gf->mutation_method_names ? gf->mutation_method_names[method] : "unspecified method name", (const char*)g.getName());
+	if (extmutinfo == 0) mutinfo = SString::sprintf("%.2f%% mutation of '%s'", 100 * chg, g.getName().c_str()); else
+		if (extmutinfo == 1) mutinfo = SString::sprintf("%.2f%% mutation(%d) of '%s'", 100 * chg, method, g.getName().c_str()); else
+			mutinfo = SString::sprintf("%.2f%% mutation(%s) of '%s'", 100 * chg, gf->mutation_method_names ? gf->mutation_method_names[method] : "unspecified method name", g.getName().c_str());
 	gv.setComment(mutinfo);
 	return gv;
@@ -324,6 +324,6 @@
 	{
 		float chg1, chg2;
-		char *g1n = strdup(g1.getGene()); //copy for crossover
-		char *g2n = strdup(g2.getGene()); //copy for crossover
+		char *g1n = strdup(g1.getGene().c_str()); //copy for crossover
+		char *g2n = strdup(g2.getGene().c_str()); //copy for crossover
 		chg1 = chg2 = 0;
 		if (gf->crossOver(g1n, g2n, chg1, chg2) == GENOPER_OK)
@@ -351,5 +351,5 @@
 		if (!ok && (count - pcount > 100))
 		{
-			FMprintf("GenMan", "CrossOver", 2, "Tried 100x and failed: %s and %s", (const char*)g1.getGene(), (const char*)g2.getGene());
+			FMprintf("GenMan", "CrossOver", 2, "Tried 100x and failed: %s and %s", g1.getGene().c_str(), g2.getGene().c_str());
 			return Geno("", -1, "", "GENOPER_OPFAIL: CrossOver() tried 100x and failed");
 		}
@@ -357,7 +357,7 @@
 	// result in g1v
 	xochg += chg;
-	if (history) saveLink((const char*)g1.getGene(), (const char*)g2.getGene(), (const char*)g1v.getGene(), chg);
+	if (history) saveLink(g1.getGene().c_str(), g2.getGene().c_str(), g1v.getGene().c_str(), chg);
 	SString xoinfo = SString::sprintf("Crossing over of '%s' (%.2f%%) and '%s' (%.2f%%)",
-		(const char*)g1.getName(), 100 * chg, (const char*)g2.getName(), 100 * (1 - chg));
+		g1.getName().c_str(), 100 * chg, g2.getName().c_str(), 100 * (1 - chg));
 	g1v.setComment(xoinfo);
 	return g1v;
@@ -369,5 +369,5 @@
 	if (format != g2.getFormat()) return GENOPER_NOOPER;
 	GenoOperators *gf = getOper_f(format);
-	if (!gf) return GENOPER_NOOPER; else return gf->similarity(g1.getGene(), g2.getGene());
+	if (!gf) return GENOPER_NOOPER; else return gf->similarity(g1.getGene().c_str(), g2.getGene().c_str());
 }
 
@@ -378,5 +378,5 @@
 	GenoOperators *gf = getOper_f(G.getFormat());
 	if (!gf) return GENSTYLE_CS(0, 0); //black & valid
-	else return gf->style(G.getGene(), pos);
+	else return gf->style(G.getGene().c_str(), pos);
 }
 
@@ -391,5 +391,5 @@
 		if (posmapped == -1) styletab[pos] = GENSTYLE_COMMENT;
 		else if (!gf) styletab[pos] = GENSTYLE_CS(0, 0); //black & valid
-		else styletab[pos] = gf->style(geny, posmapped);
+		else styletab[pos] = gf->style(geny.c_str(), posmapped);
 	}
 }
@@ -448,10 +448,10 @@
 void GenMan::p_htmlize(ExtValue *args, ExtValue *ret)
 {
-	ret->setString(HTMLize(args->getString()));
+	ret->setString(HTMLize(args->getString().c_str()));
 }
 
 void GenMan::p_htmlizeshort(ExtValue *args, ExtValue *ret)
 {
-	ret->setString(HTMLizeShort(args->getString()));
+	ret->setString(HTMLizeShort(args->getString().c_str()));
 }
 
