[Phylobase-commits] r803 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jul 23 20:05:40 CEST 2010


Author: mtholder
Date: 2010-07-23 20:05:40 +0200 (Fri, 23 Jul 2010)
New Revision: 803

Modified:
   pkg/src/nxsmultiformat.cpp
Log:
bug fixes revealed by g++ on MinGW - the rest of what should have been the previous commit 

Modified: pkg/src/nxsmultiformat.cpp
===================================================================
--- pkg/src/nxsmultiformat.cpp	2010-07-23 18:04:37 UTC (rev 802)
+++ pkg/src/nxsmultiformat.cpp	2010-07-23 18:05:40 UTC (rev 803)
@@ -331,7 +331,12 @@
 					int stateCode = dm.GetStateCodeStored(c);
 					if (stateCode == NXS_INVALID_STATE_CODE)
 						{
-						err << "Illegal state code \"" << c << "\" found when reading character " << row.size() << " for taxon " << n;
+						err << "Illegal state code \"";
+						err << c ;
+						err << "\" found when reading character ";
+						err << (unsigned long)row.size();
+						err << " for taxon ";
+						err << n;
 						throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 						}
 					row.push_back(stateCode);
@@ -501,13 +506,13 @@
 	funcExit:
 		if (matList.size() != n_taxa)
 			{
-			err << "Unexpected end of file.\nExpecting data for " << n_taxa << " taxa, but only found data for " << matList.size();
+			err << "Unexpected end of file.\nExpecting data for " << n_taxa << " taxa, but only found data for " << (unsigned long)matList.size();
 			throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 			}
 		const NxsDiscreteStateRow & lastRow = *matList.rbegin();
 		if (lastRow.size() != n_char)
 			{
-			err << "Unexpected end of file.\nExpecting " << n_char << " characters for taxon " <<  *(taxaNames.rbegin()) << ", but only found " << lastRow.size() << " characters.";
+			err << "Unexpected end of file.\nExpecting " << n_char << " characters for taxon " <<  *(taxaNames.rbegin()) << ", but only found " << (unsigned long) lastRow.size() << " characters.";
 			throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 			}
 	}
@@ -636,13 +641,13 @@
 	funcExit:
 		if (matList.size() != n_taxa)
 			{
-			err << "Unexpected end of file.\nExpecting data for " << n_taxa << " taxa, but only found data for " << matList.size();
+			err << "Unexpected end of file.\nExpecting data for " << n_taxa << " taxa, but only found data for " << (unsigned long) matList.size();
 			throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 			}
 		const NxsDiscreteStateRow & lastRow = *matList.rbegin();
 		if (lastRow.size() != n_char)
 			{
-			err << "Unexpected end of file.\nExpecting " << n_char << " characters for taxon " <<  *(taxaNames.rbegin()) << ", but only found " << lastRow.size() << " characters.";
+			err << "Unexpected end of file.\nExpecting " << n_char << " characters for taxon " <<  *(taxaNames.rbegin()) << ", but only found " << (unsigned long)lastRow.size() << " characters.";
 			throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 			}
 	}
@@ -781,7 +786,7 @@
 							{
 							if (!readingFirstBlock && (curr_tax_ind + 1) != taxaNames.size())
 								{
-								err << "Unexpected End of file. Expecting data for " << taxaNames.size() << " sequences";
+								err << "Unexpected End of file. Expecting data for " << (unsigned long) taxaNames.size() << " sequences";
 								throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 								}
 							goto funcExit;
@@ -793,7 +798,7 @@
 						int stateCode = dm.GetStateCodeStored(c);
 						if (stateCode == NXS_INVALID_STATE_CODE)
 							{
-							err << "Illegal state code \"" << c << "\" found when reading character " << row->size() << " for taxon " << n;
+							err << "Illegal state code \"" << c << "\" found when reading character " << (unsigned long)row->size() << " for taxon " << n;
 							throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 							}
 						row->push_back(stateCode);
@@ -821,7 +826,7 @@
 					{
 					if (!readingFirstBlock && (curr_tax_ind + 1) != taxaNames.size())
 						{
-						err << "Unexpected End of file. Expecting data for " << taxaNames.size() << " sequences";
+						err << "Unexpected End of file. Expecting data for " << (unsigned long) taxaNames.size() << " sequences";
 						throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 						}
 					goto funcExit;
@@ -833,7 +838,7 @@
 				{
 				if (!readingFirstBlock && (1 + curr_tax_ind) != taxaNames.size())
 					{
-					err << "Unexpected line beginning with whitespace. Expecting data for " << taxaNames.size() << " sequences";
+					err << "Unexpected line beginning with whitespace. Expecting data for " << (unsigned long)taxaNames.size() << " sequences";
 					throw NxsException(err, ftcb.position(), ftcb.line(), ftcb.column());
 					}
 				curr_tax_ind = 0;
@@ -915,7 +920,7 @@
 	{
 	NCL_ASSERT(dataB);
 	NxsString d;
-	d << "Dimensions ntax = " << matList.size() << " nchar = " << nchar << " ; ";
+	d << "Dimensions ntax = " << (unsigned long) matList.size() << " nchar = " << nchar << " ; ";
 	std::istringstream fakeDimStream(d);
 	NxsToken fakeDimToken(fakeDimStream);
 	NxsString newTaxLabel("NewTaxa");
@@ -933,7 +938,7 @@
 	{
 	NCL_ASSERT(uB);
 	NxsString d;
-	d << "Dimensions NewTaxa ntax = " << matList.size() << " ; ";
+	d << "Dimensions NewTaxa ntax = " << (unsigned long)matList.size() << " ; ";
 	std::istringstream fakeDimStream(d);
 	NxsToken fakeDimToken(fakeDimStream);
 	uB->HandleDimensions(fakeDimToken);



More information about the Phylobase-commits mailing list