]> git.lyx.org Git - features.git/commitdiff
fix some compiler warnings
authorAndré Pönitz <poenitz@gmx.net>
Fri, 21 Nov 2003 17:31:46 +0000 (17:31 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 21 Nov 2003 17:31:46 +0000 (17:31 +0000)
stick to LyX naming convention

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8120 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insetert.C
src/insets/insetert.h
src/sgml.C
src/vspace.C

index 9189e5f0bf069419b6e72883f6da232714901d42..f8b3cde8f413b706f9352e32be36f1fc0858f411 100644 (file)
@@ -408,7 +408,7 @@ void InsetERT::edit(BufferView * bv, bool left)
        } else {
                InsetCollapsable::edit(bv, left);
        }
-       set_latex_font(bv);
+       setLatexFont(bv);
        updateStatus();
 }
 
@@ -419,7 +419,7 @@ InsetERT::priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
        BufferView * bv = cmd.view();
 
        if (inset.paragraphs.begin()->empty())
-               set_latex_font(bv);
+               setLatexFont(bv);
 
        switch (cmd.action) {
 
@@ -455,7 +455,7 @@ InsetERT::priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
        case LFUN_DELETE_SKIP:
        case LFUN_DELETE_LINE_FORWARD:
        case LFUN_CUT:
-               set_latex_font(bv);
+               setLatexFont(bv);
                return InsetCollapsable::priv_dispatch(cmd, idx, pos);
 
        default:
@@ -464,7 +464,7 @@ InsetERT::priv_dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos)
 }
 
 
-string const InsetERT::get_new_label() const
+string const InsetERT::getNewLabel() const
 {
        string la;
        pos_type const max_length = 15;
@@ -490,7 +490,7 @@ string const InsetERT::get_new_label() const
 
 void InsetERT::setButtonLabel() const
 {
-       setLabel(status_ == Collapsed ? get_new_label() : _("ERT"));
+       setLabel(status_ == Collapsed ? getNewLabel() : _("ERT"));
 }
 
 
@@ -526,7 +526,7 @@ void InsetERT::draw(PainterInfo & pi, int x, int y) const
 }
 
 
-void InsetERT::set_latex_font(BufferView * /*bv*/)
+void InsetERT::setLatexFont(BufferView * /*bv*/)
 {
 #ifdef SET_HARD_FONT
        LyXFont font(LyXFont::ALL_INHERIT, latex_language);
index d3e75966f5c8373a094a6dc2856db123274e71b6..4758c627e4fb52bf6c0269a5aeaf4c4eb80a1924 100644 (file)
@@ -57,7 +57,9 @@ public:
        ///
        bool insertInset(BufferView *, InsetOld *);
        ///
-       bool insetAllowed(InsetOld::Code code) const { return code == InsetOld::NEWLINE_CODE; }
+       bool insetAllowed(InsetOld::Code code) const {
+               return code == InsetOld::NEWLINE_CODE;
+       }
        ///
        void setFont(BufferView *, LyXFont const &,
                             bool toggleall = false, bool selectall = false);
@@ -102,9 +104,7 @@ public:
        ///
        void getDrawFont(LyXFont &) const;
        ///
-       bool forceDefaultParagraphs(InsetOld const *) const {
-               return true;
-       }
+       bool forceDefaultParagraphs(InsetOld const *) const { return true; }
 protected:
        ///
        virtual
@@ -124,11 +124,11 @@ private:
        ///
        void init();
        ///
-       std::string const get_new_label() const;
+       std::string const getNewLabel() const;
        ///
        void setButtonLabel() const;
        ///
-       void set_latex_font(BufferView *);
+       void setLatexFont(BufferView *);
        /// update status on button
        void updateStatus(bool = false) const;
        ///
index cb6292f1ec28c47d49124d0d3a19cb674e090841..bd1734976012946068d6ad7b3acb49a293bf7ca4 100644 (file)
@@ -116,16 +116,16 @@ int closeTag(ostream & os, Paragraph::depth_type depth,
 }
 
 
-unsigned int closeEnvTags(ostream & ofs, bool mixcont,
+unsigned int closeEnvTags(ostream & os, bool mixcont,
                        string const & environment_inner_depth,
                        lyx::depth_type total_depth)
 {
-       unsigned int lines;
+       unsigned int lines = 0;
        if (environment_inner_depth != "!-- --") {
                string item_name= "listitem";
-               lines += closeTag(ofs, total_depth, mixcont, item_name);
+               lines += closeTag(os, total_depth, mixcont, item_name);
                if (environment_inner_depth == "varlistentry")
-                       lines += closeTag(ofs, total_depth, mixcont,
+                       lines += closeTag(os, total_depth, mixcont,
                                environment_inner_depth);
        }
        return lines;
index 2c9e4a9074169c07ff5be13cbe724d6c098c392f..84bcbc845e5f89c3060f4f528e9a5cf9a18828ba 100644 (file)
@@ -453,9 +453,6 @@ string const VSpace::asLyXCommand() const
 string const VSpace::asLatexCommand(BufferParams const & params) const
 {
        switch (kind_) {
-       case NONE:
-               return string();
-
        case DEFSKIP:
                return params.getDefSkip().asLatexCommand(params);
 
@@ -474,6 +471,13 @@ string const VSpace::asLatexCommand(BufferParams const & params) const
        case LENGTH: 
                return keep_ ? "\\vspace*{" + len_.asLatexString() + '}'
                        : "\\vspace{" + len_.asLatexString() + '}';
+
+       case NONE:
+               return string();
+
+       default:
+               BOOST_ASSERT(false);
+               return string();
        }
 }
 
@@ -486,10 +490,6 @@ int VSpace::inPixels(BufferView const & bv) const
 
        switch (kind_) {
 
-       case NONE:
-               // value for this is already set
-               return 0;
-
        case DEFSKIP:
                return bv.buffer()->params().getDefSkip().inPixels(bv);
 
@@ -510,5 +510,12 @@ int VSpace::inPixels(BufferView const & bv) const
 
        case LENGTH:
                return len_.len().inPixels(bv.workWidth());
+
+       case NONE:
+               return 0;
+
+       default:
+               BOOST_ASSERT(false);
+               return 0;
        }
 }