From: ishmal Date: Tue, 29 Apr 2008 17:57:28 +0000 (+0000) Subject: Change in stdarg calls, to correct for const-ness X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=50265120fc5916ca13a60a6ec5050e6f12442ed1;p=inkscape.git Change in stdarg calls, to correct for const-ness --- diff --git a/src/extension/internal/pov-out.cpp b/src/extension/internal/pov-out.cpp index 1e7d50548..dbfb52676 100644 --- a/src/extension/internal/pov-out.cpp +++ b/src/extension/internal/pov-out.cpp @@ -9,7 +9,7 @@ * http://www.povray.org * * Authors: - * Bob Jamison + * Bob Jamison * * Copyright (C) 2004-2008 Authors * @@ -113,7 +113,7 @@ static PovOutput::String dstr(double d) /** * Output data to the buffer, printf()-style */ -void PovOutput::out(char const *fmt, ...) +void PovOutput::out(const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -132,11 +132,7 @@ void PovOutput::out(char const *fmt, ...) */ void PovOutput::vec2(double a, double b) { - out("<"); - out(dstr(a).c_str()); - out(", "); - out(dstr(b).c_str()); - out(">"); + out("<%s, %s>", dstr(a).c_str(), dstr(b).c_str()); } @@ -146,13 +142,7 @@ void PovOutput::vec2(double a, double b) */ void PovOutput::vec3(double a, double b, double c) { - out("<"); - out(dstr(a).c_str()); - out(", "); - out(dstr(b).c_str()); - out(", "); - out(dstr(c).c_str()); - out(">"); + out("<%s, %s, %s>", dstr(a).c_str(), dstr(b).c_str(), dstr(c).c_str()); } @@ -162,15 +152,8 @@ void PovOutput::vec3(double a, double b, double c) */ void PovOutput::vec4(double a, double b, double c, double d) { - out("<"); - out(dstr(a).c_str()); - out(", "); - out(dstr(b).c_str()); - out(", "); - out(dstr(c).c_str()); - out(", "); - out(dstr(d).c_str()); - out(">"); + out("<%s, %s, %s, %s>", dstr(a).c_str(), dstr(b).c_str(), + dstr(c).c_str(), dstr(d).c_str()); } diff --git a/src/extension/internal/pov-out.h b/src/extension/internal/pov-out.h index a44bd947e..822a55650 100644 --- a/src/extension/internal/pov-out.h +++ b/src/extension/internal/pov-out.h @@ -6,7 +6,7 @@ * the current SVG document. * * Authors: - * Bob Jamison + * Bob Jamison * * Copyright (C) 2004-2008 Authors * @@ -72,7 +72,7 @@ private: /** * Format text to our output buffer */ - void out(char const *fmt, ...) G_GNUC_PRINTF(2,3); + void out(const char *fmt, ...) G_GNUC_PRINTF(2,3); /** * Output a 2d vector