X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fcounters.C;h=af660bf46d8a510cad9686d87a8a1b63cf83ab5a;hb=98c966c64594611e469313314abd1e59524adb4a;hp=53d495a6815009b9d9b0ecf3367f30306596a5b4;hpb=83acbbd5237373926c629855379e1df9a04209b2;p=lyx.git diff --git a/src/counters.C b/src/counters.C index 53d495a681..af660bf46d 100644 --- a/src/counters.C +++ b/src/counters.C @@ -1,6 +1,6 @@ /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich @@ -58,14 +58,14 @@ void Counter::reset() } -Counters::~Counters() +Counters::~Counters() { // We need this since we store the Counter's as pointers in // the counterList. for (CounterList::iterator it = counterList.begin(); it != counterList.end(); ++it) - delete (*it).second; + delete it->second; } @@ -100,20 +100,20 @@ void Counters::newCounter(string const & newc, string const & oldc) } Counter * tmp = new Counter; - (*it).second->onstep.connect(SigC::slot(tmp, - &Counter::reset)); + it->second->onstep.connect(SigC::slot(tmp, + &Counter::reset)); counterList[newc] = tmp; } -void Counters::set(string const & ctr, int val) +void Counters::set(string const & ctr, int val) { CounterList::iterator it = counterList.find(ctr); if (it == counterList.end()) { lyxerr << "Counter does not exist." << endl; return; } - (*it).second->set(val); + it->second->set(val); } @@ -124,18 +124,18 @@ void Counters::addto(string const & ctr, int val) lyxerr << "Counter does not exist." << endl; return; } - (*it).second->addto(val); + it->second->addto(val); } -int Counters::value(string const & ctr) const +int Counters::value(string const & ctr) const { CounterList::const_iterator cit = counterList.find(ctr); if (cit == counterList.end()) { lyxerr << "Counter does not exist." << endl; return 0; } - return (*cit).second->value(); + return cit->second->value(); } @@ -146,5 +146,5 @@ void Counters::step(string const & ctr) lyxerr << "Counter does not exist." << endl; return; } - (*it).second->step(); + it->second->step(); }