X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDepTable.C;h=bd70a1971a381c3ea4234603f53f63fac0e615e0;hb=664eb7ff45dbb4fabc22ec0b56798031a82335b1;hp=d2fc3f1b9032f5bfc92aafb28637b57245417982;hpb=85798535a19919e82cc94a177a8414c542a9c5bf;p=lyx.git diff --git a/src/DepTable.C b/src/DepTable.C index d2fc3f1b90..bd70a1971a 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -37,7 +37,7 @@ void DepTable::insert(string const & fi, if (deplist.find(f) == deplist.end()) { if (upd) { one = two; - two = lyx::sum(f.c_str()); + two = lyx::sum(f); } deplist[f] = make_pair(one, two); } @@ -46,11 +46,11 @@ void DepTable::insert(string const & fi, void DepTable::update() { - for(DepList::iterator itr = deplist.begin(); + for (DepList::iterator itr = deplist.begin(); itr != deplist.end(); ++itr) { - unsigned long one = (*itr).second.second; - unsigned long two = lyx::sum((*itr).first.c_str()); + unsigned long const one = (*itr).second.second; + unsigned long const two = lyx::sum((*itr).first); (*itr).second = make_pair(one, two); if (lyxerr.debugging(Debug::DEPEND)) { lyxerr << "Update dep: " << (*itr).first << " " @@ -93,7 +93,7 @@ bool DepTable::extchanged(string const & ext) const for (DepList::const_iterator cit = deplist.begin(); cit != deplist.end(); ++cit) { - if (suffixIs((*cit).first, ext.c_str())) { + if (suffixIs((*cit).first, ext)) { if ((*cit).second.first != (*cit).second.second) return true; } @@ -113,13 +113,13 @@ bool DepTable::exist(string const & fil) const void DepTable::remove_files_with_extension(string const & suf) { DepList tmp; - for (DepList::const_iterator cit = deplist.begin(); + // we want const_iterator (Lgb) + for (DepList::iterator cit = deplist.begin(); cit != deplist.end(); ++cit) { - if (!suffixIs((*cit).first, suf.c_str())) + if (!suffixIs((*cit).first, suf)) tmp[(*cit).first] = (*cit).second; } deplist.swap(tmp); - } @@ -127,8 +127,7 @@ void DepTable::write(string const & f) const { ofstream ofs(f.c_str()); for (DepList::const_iterator cit = deplist.begin(); - cit != deplist.end(); - ++cit) { + cit != deplist.end(); ++cit) { if (lyxerr.debugging(Debug::DEPEND)) { lyxerr << "Write dep: " << (*cit).first << " "