X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=libctsim%2Farray2dfile.cpp;h=b3538da0b79f610a325c0e7c729884c325fadb70;hp=e35a14982056cbb5f414b8fb73402ebe58a1c4a8;hb=9703ace3c451ce079967284bf191783736dbc77f;hpb=55426f4170ed9dc777c3cec3741e4a59e6eebd38 diff --git a/libctsim/array2dfile.cpp b/libctsim/array2dfile.cpp index e35a149..b3538da 100644 --- a/libctsim/array2dfile.cpp +++ b/libctsim/array2dfile.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: array2dfile.cpp,v 1.16 2000/12/06 15:17:51 kevin Exp $ +** $Id: array2dfile.cpp,v 1.19 2000/12/16 02:31:00 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -555,13 +555,15 @@ Array2dFile::labelAdd (const Array2dFileLabel& label) } void -Array2dFile::labelsCopy (Array2dFile& copyFile, const char* const idStr) +Array2dFile::labelsCopy (Array2dFile& copyFile, const char* const pszId) { - string id = idStr; + string id; + if (pszId) + id = pszId; for (unsigned int i = 0; i < copyFile.getNumLabels(); i++) { Array2dFileLabel l (copyFile.labelGet (i)); string lstr = l.getLabelString(); - lstr = idStr + lstr; + lstr = id + lstr; l.setLabelString (lstr); labelAdd (l); }