summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4768337)
raw | patch | inline | side by side (parent: 4768337)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 1 Nov 2006 04:09:26 +0000 (04:09 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 1 Nov 2006 04:09:26 +0000 (04:09 +0000) |
src/svg/css-ostringstream.cpp | patch | blob | history |
index d59b8083ad4c2cb5fba6a9ed8f664e36387cec3c..362eb7662ffca771509e75c5d02239776c314ce8 100644 (file)
{
char buf[32]; // haven't thought about how much is really required.
switch (prec) {
- case 10: g_ascii_formatd(buf, sizeof(buf), "%.10f", d);
- case 9: g_ascii_formatd(buf, sizeof(buf), "%.9f", d);
- case 8: g_ascii_formatd(buf, sizeof(buf), "%.8f", d);
- case 7: g_ascii_formatd(buf, sizeof(buf), "%.7f", d);
- case 6: g_ascii_formatd(buf, sizeof(buf), "%.6f", d);
- case 5: g_ascii_formatd(buf, sizeof(buf), "%.5f", d);
- case 4: g_ascii_formatd(buf, sizeof(buf), "%.4f", d);
- case 3: g_ascii_formatd(buf, sizeof(buf), "%.3f", d);
- case 2: g_ascii_formatd(buf, sizeof(buf), "%.2f", d);
- case 1: g_ascii_formatd(buf, sizeof(buf), "%.1f", d);
- case 0: g_ascii_formatd(buf, sizeof(buf), "%.0f", d);
+ case 9: g_ascii_formatd(buf, sizeof(buf), "%.9f", d); break;
+ case 8: g_ascii_formatd(buf, sizeof(buf), "%.8f", d); break;
+ case 7: g_ascii_formatd(buf, sizeof(buf), "%.7f", d); break;
+ case 6: g_ascii_formatd(buf, sizeof(buf), "%.6f", d); break;
+ case 5: g_ascii_formatd(buf, sizeof(buf), "%.5f", d); break;
+ case 4: g_ascii_formatd(buf, sizeof(buf), "%.4f", d); break;
+ case 3: g_ascii_formatd(buf, sizeof(buf), "%.3f", d); break;
+ case 2: g_ascii_formatd(buf, sizeof(buf), "%.2f", d); break;
+ case 1: g_ascii_formatd(buf, sizeof(buf), "%.1f", d); break;
+ case 0: g_ascii_formatd(buf, sizeof(buf), "%.0f", d); break;
+ case 10: default: g_ascii_formatd(buf, sizeof(buf), "%.10f", d); break;
}
os << strip_trailing_zeros(buf);
}