]> git.lyx.org Git - lyx.git/blobdiff - src/DepTable.C
another pesky \#warning snuck in
[lyx.git] / src / DepTable.C
index 1b8f32a1d6260dee6660741e801fdcac59d0c5e1..bd70a1971a381c3ea4234603f53f63fac0e615e0 100644 (file)
@@ -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,9 +113,10 @@ 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);
@@ -126,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 << " "