From 4b32876be0e3870815993f05ec3a5ebfc710ac4c Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 20 Apr 2009 10:00:54 +0000 Subject: [PATCH] revert 29349; Abdel made me do it git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29356 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Counters.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Counters.cpp b/src/Counters.cpp index 5211d5a074..57439ecca3 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -265,8 +265,8 @@ void Counters::reset() // It only needs to be done when the textclass is // updated, but in practice the extra work is probably // not noticeable (JMarc) - docstring const & fls = flattenLabelString(it->first, false, callers); - docstring const & flsa = flattenLabelString(it->first, true, callers); + docstring const fls = flattenLabelString(it->first, false, callers); + docstring const flsa = flattenLabelString(it->first, true, callers); it->second.setFlatLabelStrings(fls, flsa); } } @@ -439,7 +439,7 @@ docstring Counters::theCounter(docstring const & counter) const } -docstring Counters::flattenLabelString(docstring const & counter, bool in_appendix, +docstring const Counters::flattenLabelString(docstring const & counter, bool in_appendix, vector & callers) const { docstring label; @@ -478,8 +478,8 @@ docstring Counters::flattenLabelString(docstring const & counter, bool in_append while (k < ls.size() && lowercase(ls[k]) >= 'a' && lowercase(ls[k]) <= 'z') ++k; - docstring const & newc = ls.substr(j, k - j); - docstring const & repl = flattenLabelString(newc, in_appendix, callers); + docstring const newc = ls.substr(j, k - j); + docstring const repl = flattenLabelString(newc, in_appendix, callers); ls.replace(i, k - j + 4, repl); } callers.pop_back(); @@ -504,8 +504,8 @@ docstring Counters::counterLabel(docstring const & format) const while (k < label.size() && lowercase(label[k]) >= 'a' && lowercase(label[k]) <= 'z') ++k; - docstring const & newc = label.substr(j, k - j); - docstring const & repl = theCounter(newc); + docstring const newc = label.substr(j, k - j); + docstring const repl = theCounter(newc); label.replace(i, k - j + 4, repl); } while (true) { @@ -522,7 +522,7 @@ docstring Counters::counterLabel(docstring const & format) const break; docstring const numbertype(label, i + 1, j - i - 1); docstring const counter(label, j + 1, k - j - 1); - docstring const & rep = labelItem(counter, numbertype); + docstring const rep = labelItem(counter, numbertype); label = docstring(label, 0, i) + rep + docstring(label, k + 1, docstring::npos); } -- 2.39.2