]> git.lyx.org Git - features.git/commitdiff
fix compiler warnings
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 19 Dec 2004 20:22:24 +0000 (20:22 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 19 Dec 2004 20:22:24 +0000 (20:22 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9398 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/ghelpers.C

index 1f1a2ca03270f00acd6d7a538f9718c4da46fb10..2215ca052c00bdfa1a33c64de28243a0ff118ac9 100644 (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>
 
        * glade/Makefile.am: update to include all current glade
index 5d1e540ee1f1554508958bca6bbb738fdc31f3fe..2491e1721d67b334a6c07672cd77030a80bce02c 100644 (file)
@@ -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<string> const buildLengthNoRelUnitList()
        vector<string> 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]);
        }