Author: rgheck
Date: Sun Jun 12 20:03:32 2011
New Revision: 39021
URL: http://www.lyx.org/trac/changeset/39021
Log:
Modify r38980 in response to Vincent's comments.
Modified:
lyx-devel/trunk/src/Buffer.cpp
lyx-devel/trunk/src/Buffer.h
lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
Modified: lyx-devel/trunk/src/Buffer.cpp
==============================================================================
--- lyx-devel/trunk/src/Buffer.cpp Sun Jun 12 20:01:53 2011 (r39020)
+++ lyx-devel/trunk/src/Buffer.cpp Sun Jun 12 20:03:32 2011 (r39021)
@@ -3154,18 +3154,7 @@
}
-ErrorList const & Buffer::errorList(string const & type) const
-{
- static const ErrorList emptyErrorList;
- map<string, ErrorList>::iterator it = d->errorLists.find(type);
- if (it == d->errorLists.end())
- return emptyErrorList;
-
- return it->second;
-}
-
-
-ErrorList & Buffer::errorList(string const & type)
+ErrorList & Buffer::errorList(string const & type) const
{
return d->errorLists[type];
}
Modified: lyx-devel/trunk/src/Buffer.h
==============================================================================
--- lyx-devel/trunk/src/Buffer.h Sun Jun 12 20:01:53 2011 (r39020)
+++ lyx-devel/trunk/src/Buffer.h Sun Jun 12 20:03:32 2011 (r39021)
@@ -562,8 +562,7 @@
/// errors (like parsing or LateX compilation). This method is const
/// because modifying the returned ErrorList does not touch the document
/// contents.
- ErrorList & errorList(std::string const & type);
- ErrorList const & errorList(std::string const & type) const;
+ ErrorList & errorList(std::string const & type) const;
/// The Toc backend.
/// This is useful only for screen visualisation of the Buffer. This
Modified: lyx-devel/trunk/src/frontends/qt4/GuiView.cpp
==============================================================================
--- lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Sun Jun 12 20:01:53
2011 (r39020)
+++ lyx-devel/trunk/src/frontends/qt4/GuiView.cpp Sun Jun 12 20:03:32
2011 (r39021)
@@ -1451,7 +1451,7 @@
#if EXPORT_in_THREAD && (QT_VERSION >= 0x040400)
// We are called with from_master == false by default, so we
// have to figure out whether that is the case or not.
- ErrorList & el = const_cast<ErrorList
&>(bv->buffer().errorList(error_type));
+ ErrorList & el = bv->buffer().errorList(error_type);
if (el.empty()) {
el = bv->buffer().masterBuffer()->errorList(error_type);
from_master = true;