From: Georg Baum Date: Sun, 19 Dec 2004 20:22:24 +0000 (+0000) Subject: fix compiler warnings X-Git-Tag: 1.6.10~14722 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5da7ac4fb5575e96bd4af544877a91bf76617257;p=features.git fix compiler warnings git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9398 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 1f1a2ca032..2215ca052c 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,3 +1,10 @@ +2004-12-19 Georg Baum + + * ghelpers.C (getDefaultUnit): add return statement to shut up the + compiler + * ghelpers.C (buildLengthNoRelUnitList): use std::string::npos + instead of -1 + 2004-12-12 John Spray * glade/Makefile.am: update to include all current glade diff --git a/src/frontends/gtk/ghelpers.C b/src/frontends/gtk/ghelpers.C index 5d1e540ee1..2491e1721d 100644 --- a/src/frontends/gtk/ghelpers.C +++ b/src/frontends/gtk/ghelpers.C @@ -69,6 +69,7 @@ Gtk::BuiltinStockID getGTKStockIcon(FuncRequest const & func) } } + string const getDefaultUnit() { switch (lyxrc.default_papersize) { @@ -81,6 +82,8 @@ string const getDefaultUnit() case PAPER_A5PAPER: case PAPER_B5PAPER: return "cm"; break; } + // shut up compiler + return "cm"; } @@ -122,7 +125,7 @@ vector const buildLengthNoRelUnitList() vector data; for (int i = 0; i < num_units; ++i) { string str(unit_name_gui[i]); - if (str.find("%") == -1) + if (str.find("%") == string::npos) data.push_back(unit_name_gui[i]); }