]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.C
Fix #1736
[lyx.git] / src / buffer_funcs.C
index b1d50680814fc57d79da8710fdc1a925f240c7bf..2f41213184713f006c812cc18a806e95ec0ffe36 100644 (file)
@@ -31,6 +31,8 @@
 #include "support/filetools.h"
 #include "support/lyxlib.h"
 
+#include <boost/bind.hpp>
+
 using lyx::support::bformat;
 using lyx::support::FileInfo;
 using lyx::support::IsFileWriteable;
@@ -211,11 +213,7 @@ void bufferErrors(Buffer const & buf, TeXErrors const & terr)
 
 void bufferErrors(Buffer const & buf, ErrorList const & el)
 {
-       ErrorList::const_iterator it = el.begin();
-       ErrorList::const_iterator end = el.end();
-
-       for (; it != end; ++it)
-               buf.error(*it);
+       for_each(el.begin(), el.end(), bind(ref(buf.error), _1));
 }