summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2008-04-29 17:57:28 +0000
committerishmal <ishmal@users.sourceforge.net>2008-04-29 17:57:28 +0000
commit52fba43e8384fe3b282810714de6858736951772 (patch)
tree5b94127ecfc33cb945a98fc5fab9f36c8230e7f2 /src
parentmake format string warnings fatal, since it should never happen (diff)
downloadinkscape-52fba43e8384fe3b282810714de6858736951772.tar.gz
inkscape-52fba43e8384fe3b282810714de6858736951772.zip
Change in stdarg calls, to correct for const-ness
(bzr r5550)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/pov-out.cpp29
-rw-r--r--src/extension/internal/pov-out.h4
2 files changed, 8 insertions, 25 deletions
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 <ishmalius@gmail.com>
+ * Bob Jamison <ishmal@inkscape.org>
*
* 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 <rjamison@titan.com>
+ * Bob Jamison <ishmal@inkscape.org>
*
* 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