X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FDepTable.C;h=0bc13ef436c0ef739596e4488b13f2006acbd0a9;hb=ab254289c832cd045c56e6012d14b048618cb833;hp=d2fc3f1b9032f5bfc92aafb28637b57245417982;hpb=85798535a19919e82cc94a177a8414c542a9c5bf;p=lyx.git diff --git a/src/DepTable.C b/src/DepTable.C index d2fc3f1b90..0bc13ef436 100644 --- a/src/DepTable.C +++ b/src/DepTable.C @@ -3,9 +3,9 @@ * * LyX, The Document Processor * Copyright 1995 Matthias Ettrich - * Copyright 1995-2000 The LyX Team. + * Copyright 1995-2001 The LyX Team. * - * This file is Copyright 1996-2000 + * This file is Copyright 1996-2001 * Lars Gullik Bjønnes * * ====================================================== @@ -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 << " "