fix compiler warnings

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9398 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2004-12-19 20:22:24 +00:00
parent 70bcd97d45
commit 5da7ac4fb5
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-12-19 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* 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 <spray_john@users.sourceforge.net> 2004-12-12 John Spray <spray_john@users.sourceforge.net>
* glade/Makefile.am: update to include all current glade * glade/Makefile.am: update to include all current glade

View File

@ -69,6 +69,7 @@ Gtk::BuiltinStockID getGTKStockIcon(FuncRequest const & func)
} }
} }
string const getDefaultUnit() string const getDefaultUnit()
{ {
switch (lyxrc.default_papersize) { switch (lyxrc.default_papersize) {
@ -81,6 +82,8 @@ string const getDefaultUnit()
case PAPER_A5PAPER: case PAPER_A5PAPER:
case PAPER_B5PAPER: return "cm"; break; case PAPER_B5PAPER: return "cm"; break;
} }
// shut up compiler
return "cm";
} }
@ -122,7 +125,7 @@ vector<string> const buildLengthNoRelUnitList()
vector<string> data; vector<string> data;
for (int i = 0; i < num_units; ++i) { for (int i = 0; i < num_units; ++i) {
string str(unit_name_gui[i]); string str(unit_name_gui[i]);
if (str.find("%") == -1) if (str.find("%") == string::npos)
data.push_back(unit_name_gui[i]); data.push_back(unit_name_gui[i]);
} }