--- a/ldtypes.cpp Tue Apr 16 20:32:42 2013 +0300 +++ b/ldtypes.cpp Wed Apr 17 14:09:38 2013 +0300 @@ -110,18 +110,18 @@ // ============================================================================= str LDComment::getContents () { - return str::mkfmt ("0 %s", zText.chars ()); + return format ("0 %s", zText.chars ()); } str LDSubfile::getContents () { - str val = str::mkfmt ("1 %d %s ", dColor, vPosition.getStringRep (false).chars ()); + str val = format ("1 %d %s ", dColor, vPosition.getStringRep (false).chars ()); val += mMatrix.getStringRep (); val += zFileName; return val; } str LDLine::getContents () { - str val = str::mkfmt ("2 %d", dColor); + str val = format ("2 %d", dColor); for (ushort i = 0; i < 2; ++i) val.appendformat (" %s", vaCoords[i].getStringRep (false).chars ()); @@ -130,7 +130,7 @@ } str LDTriangle::getContents () { - str val = str::mkfmt ("3 %d", dColor); + str val = format ("3 %d", dColor); for (ushort i = 0; i < 3; ++i) val.appendformat (" %s", vaCoords[i].getStringRep (false).chars ()); @@ -139,7 +139,7 @@ } str LDQuad::getContents () { - str val = str::mkfmt ("4 %d", dColor); + str val = format ("4 %d", dColor); for (ushort i = 0; i < 4; ++i) val.appendformat (" %s", vaCoords[i].getStringRep (false).chars ()); @@ -148,7 +148,7 @@ } str LDCondLine::getContents () { - str val = str::mkfmt ("5 %d", dColor); + str val = format ("5 %d", dColor); // Add the coordinates for (ushort i = 0; i < 4; ++i) @@ -162,7 +162,7 @@ } str LDVertex::getContents () { - return str::mkfmt ("0 !LDFORGE VERTEX %d %s", dColor, vPosition.getStringRep (false).chars()); + return format ("0 !LDFORGE VERTEX %d %s", dColor, vPosition.getStringRep (false).chars()); } str LDEmpty::getContents () { @@ -182,7 +182,7 @@ }; str LDBFC::getContents () { - return str::mkfmt ("0 BFC %s", LDBFC::saStatements[eStatement]); + return format ("0 BFC %s", LDBFC::saStatements[eStatement]); } // ============================================================================= @@ -448,7 +448,7 @@ if (!bFirstDetails) zText += ", "; - str zNoun = str::mkfmt ("%s%s", g_saObjTypeNames[eType], PLURAL (ulCount)); + str zNoun = format ("%s%s", g_saObjTypeNames[eType], PLURAL (ulCount)); // Plural of "vertex" is "vertices". Stupid English. if (eType == OBJ_Vertex && ulCount != 1) @@ -678,7 +678,7 @@ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ============================================================================= str LDRadial::getContents () { - return str::mkfmt ("0 !LDFORGE RADIAL %s %d %d %d %d %s %s", + return format ("0 !LDFORGE RADIAL %s %d %d %d %d %s %s", str (radialTypeName()).toupper ().strip (' ').chars (), dColor, dSegments, dDivisions, dRingNum, vPosition.getStringRep (false).chars(), mMatrix.getStringRep().chars()); @@ -712,10 +712,10 @@ } // Compose some general information: prefix, fraction, root, ring number - str zPrefix = (dDivisions == 16) ? "" : str::mkfmt ("%d/", dDivisions); - str zFrac = str::mkfmt ("%d-%d", dNumerator, dDenominator); + str zPrefix = (dDivisions == 16) ? "" : format ("%d/", dDivisions); + str zFrac = format ("%d-%d", dNumerator, dDenominator); str zRoot = g_saRadialNameRoots[eRadialType]; - str zRingNum = (eRadialType == Ring || eRadialType == Cone) ? str::mkfmt ("%d", dRingNum) : ""; + str zRingNum = (eRadialType == Ring || eRadialType == Cone) ? format ("%d", dRingNum) : ""; // Truncate the root if necessary (7-16rin4.dat for instance). // However, always keep the root at least 2 characters. @@ -723,5 +723,5 @@ zRoot -= min<short> (max<short> (dExtra, 0), 2); // Stick them all together and return the result. - return str::mkfmt ("%s%s%s%s", zPrefix.chars(), zFrac.chars (), zRoot.chars (), zRingNum.chars ()); + return format ("%s%s%s%s", zPrefix.chars(), zFrac.chars (), zRoot.chars (), zRingNum.chars ()); } \ No newline at end of file