]> git.lyx.org Git - features.git/commitdiff
Remove unused variables
authorGeorg Baum <baum@lyx.org>
Sat, 10 Oct 2015 19:28:28 +0000 (21:28 +0200)
committerGeorg Baum <baum@lyx.org>
Sat, 10 Oct 2015 19:28:28 +0000 (21:28 +0200)
Found by cppcheck: (style) Unused variable: x

src/Counters.cpp
src/Paragraph.cpp
src/frontends/qt4/GuiGraphics.cpp
src/frontends/qt4/qt_helpers.cpp
src/insets/InsetNewline.cpp
src/insets/InsetNewpage.cpp
src/insets/InsetSeparator.cpp
src/insets/InsetSpace.cpp
src/lyxfind.cpp
src/output_docbook.cpp

index 56ab1b508c1a544e6e5762aae8190a841150e54e..fe2604044994b1f075f438d636f1353e66be0905 100644 (file)
@@ -525,8 +525,6 @@ docstring Counters::flattenLabelString(docstring const & counter,
                                       string const & lang,
                                       vector<docstring> & callers) const
 {
-       docstring label;
-
        if (find(callers.begin(), callers.end(), counter) != callers.end()) {
                // recursion detected
                lyxerr << "Warning: Recursion in label for counter `"
index 37067acb65ea0947c6fd6ea5dc0833baee2a028f..8ec57a5511b1aca5f60899338666d59cba5ded91 100644 (file)
@@ -2193,7 +2193,6 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams,
                        corrected_env(os, begin_tag, "flushright", code, lastpar, column);
                break;
        } case LYX_ALIGN_RIGHT: {
-               string output;
                if (owner_->getParLanguage(bparams)->babel() != "hebrew")
                        corrected_env(os, begin_tag, "flushright", code, lastpar, column);
                else
index 05ee2137c25e11a2dde94dde425f51c965f16131..2ef5c6b6f62992f177b592fa365144e7089ae0d2 100644 (file)
@@ -654,7 +654,6 @@ void GuiGraphics::applyView()
        // the bb section
        igp.bbox = graphics::BoundingBox();
        if (bbChanged) {
-               string bb;
                string lbXs = widgetToDoubleStr(lbX);
                string lbYs = widgetToDoubleStr(lbY);
                string rtXs = widgetToDoubleStr(rtX);
index 44baa5b980ca4718f1fe1484b141b2b31ea37555..4eacaca749e7346f6046dfe521851740124bd265 100644 (file)
@@ -466,7 +466,6 @@ Filter::Filter(docstring const & description, string const & globs)
        string const expanded_globs = convert_brace_glob(globs);
 
        // Split into individual globs.
-       vector<string> matches;
        Tokenizer const tokens(expanded_globs, separator);
        globs_ = vector<string>(tokens.begin(), tokens.end());
 }
index 0927c7e7d06de1e247d99db091cd4d815b765247..99cbf14470cccc343fea6c84824315d1000a2139 100644 (file)
@@ -40,7 +40,6 @@ InsetNewline::InsetNewline() : Inset(0)
 
 void InsetNewlineParams::write(ostream & os) const
 {
-       string command;
        switch (kind) {
        case InsetNewlineParams::NEWLINE:
                os << "newline";
index 15d45f071a2157625e3a07ec8feb6be827af843e..5e98428fcdcd7dfd060adacbc189325229719fd5 100644 (file)
@@ -47,7 +47,6 @@ InsetNewpage::InsetNewpage(InsetNewpageParams const & params)
 
 void InsetNewpageParams::write(ostream & os) const
 {
-       string command;
        switch (kind) {
        case InsetNewpageParams::NEWPAGE:
                os << "newpage";
index 1ec73c26ebb048abaceba53bda67b4118b854057..7fb7c64460ceb9350fb632a42763536a086f9fdb 100644 (file)
@@ -45,7 +45,6 @@ InsetSeparator::InsetSeparator(InsetSeparatorParams const & params)
 
 void InsetSeparatorParams::write(ostream & os) const
 {
-       string command;
        switch (kind) {
        case InsetSeparatorParams::PLAIN:
                os <<  "plain";
index 3a5161a9ed9fd1469d96fa9eb11d420f5c6420bb..b8cab16fd0ed3f963082aec36bd211c738a30c53 100644 (file)
@@ -387,7 +387,6 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const
 
 void InsetSpaceParams::write(ostream & os) const
 {
-       string command;
        switch (kind) {
        case InsetSpaceParams::NORMAL:
                os << "\\space{}";
index c217281b66f526d2e00cbe678184bd146df3ecb6..85b66d071588639d32e4447c9f0358897e016e04 100644 (file)
@@ -1008,7 +1008,6 @@ docstring stringifyFromCursor(DocIterator const & cur, int len)
                pos_type end = ( len == -1 || cur.pos() + len > int(par.size()) ) ?
                        int(par.size()) : cur.pos() + len;
                OutputParams runparams(&cur.buffer()->params().encoding());
-               odocstringstream os;
                runparams.nice = true;
                runparams.flavor = OutputParams::LATEX;
                runparams.linelen = 100000; //lyxrc.plaintext_linelen;
index 48b2f605e75233d9ca74d57bfaaa593b721c4365..12061ef462c3581e0b832e23be3164088ac9725b 100644 (file)
@@ -136,7 +136,6 @@ ParagraphList::const_iterator makeEnvironment(
 
        Layout const & defaultstyle = buf.params().documentClass().defaultLayout();
        Layout const & bstyle = par->layout();
-       string item_tag;
 
        // Opening outter tag
        sgml::openTag(buf, os, runparams, *pbegin);
@@ -238,7 +237,7 @@ ParagraphList::const_iterator makeEnvironment(
        if (bstyle.latextype == LATEX_ENVIRONMENT && bstyle.pass_thru)
                os << "]]>";
 
-       // Closing outter tag
+       // Closing outer tag
        sgml::closeTag(os, *pbegin);
 
        return pend;