X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCounters.cpp;h=0133f76bcab455f876c0f05631641313d09dfe32;hb=4ed0312c51704780af1c452d3a82a84171b3725a;hp=519cb2734668e9a39c440bec0236d5208cde0919;hpb=f5c7acb140230dd0b6d96118ebab0ec364e2951c;p=lyx.git diff --git a/src/Counters.cpp b/src/Counters.cpp index 519cb27346..0133f76bca 100644 --- a/src/Counters.cpp +++ b/src/Counters.cpp @@ -421,6 +421,16 @@ void Counters::reset(docstring const & match) } +bool Counters::copy(docstring const & cnt, docstring const & newcnt) +{ + auto const it = counterList_.find(cnt); + if (it == counterList_.end()) + return false; + counterList_[newcnt] = it->second; + return true; +} + + bool Counters::remove(docstring const & cnt) { bool retval = counterList_.erase(cnt);