mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
tiny optimization.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16657 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7317e80b1f
commit
f92c3db951
@ -66,7 +66,7 @@ void Counter::reset()
|
||||
}
|
||||
|
||||
|
||||
docstring Counter::master() const
|
||||
docstring const & Counter::master() const
|
||||
{
|
||||
return master_;
|
||||
}
|
||||
@ -318,12 +318,13 @@ docstring Counters::counterLabel(docstring const & format)
|
||||
if (j == docstring::npos)
|
||||
break;
|
||||
size_t const k = label.find('}', j + 1);
|
||||
if (k == string::npos)
|
||||
if (k == docstring::npos)
|
||||
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);
|
||||
label = docstring(label, 0, i) + rep + docstring(label, k + 1, string::npos);
|
||||
label = docstring(label, 0, i) + rep
|
||||
+ docstring(label, k + 1, docstring::npos);
|
||||
//lyxerr << " : " << " (" << counter << ","
|
||||
// << numbertype << ") -> " << label << endl;
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
///
|
||||
void reset();
|
||||
/// Returns the master counter of this counter
|
||||
lyx::docstring master() const;
|
||||
lyx::docstring const & master() const;
|
||||
/// sets the master counter for this counter
|
||||
void setMaster(lyx::docstring const & m);
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user