From 863e29efafb46dd2d022f903bb53a86845179c8c Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Wed, 30 Dec 2009 23:28:06 -0800 Subject: [PATCH] Warning cleanup for char const* --- src/sp-flowtext.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp index feb79cd9a..53bcd425d 100644 --- a/src/sp-flowtext.cpp +++ b/src/sp-flowtext.cpp @@ -375,15 +375,13 @@ static gchar *sp_flowtext_description(SPItem *item) Inkscape::Text::Layout const &layout = SP_FLOWTEXT(item)->layout; int const nChars = layout.iteratorToCharIndex(layout.end()); - char *trunc = ""; - if (layout.inputTruncated()) { - trunc = _(" [truncated]"); - } + char const *trunc = (layout.inputTruncated()) ? _(" [truncated]") : ""; - if (SP_FLOWTEXT(item)->has_internal_frame()) + if (SP_FLOWTEXT(item)->has_internal_frame()) { return g_strdup_printf(ngettext("Flowed text (%d character%s)", "Flowed text (%d characters%s)", nChars), nChars, trunc); - else + } else { return g_strdup_printf(ngettext("Linked flowed text (%d character%s)", "Linked flowed text (%d characters%s)", nChars), nChars, trunc); + } } static void sp_flowtext_snappoints(SPItem const *item, bool const target, SnapPointsWithType &p, Inkscape::SnapPreferences const */*snapprefs*/) -- 2.30.2