Avoid errorList copy.

* ControlErrorList:
  - error_list_: deleted
  - error_type_: new private member.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16849 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-25 10:39:40 +00:00
parent 2a1da61470
commit 2a890b4b96
2 changed files with 4 additions and 4 deletions

View File

@ -45,18 +45,18 @@ void ControlErrorList::clearParams()
ErrorList const & ControlErrorList::errorList() const ErrorList const & ControlErrorList::errorList() const
{ {
return errorlist_; return kernel().bufferview()->buffer()->errorList(error_type_);
} }
bool ControlErrorList::initialiseParams(string const & error_type) bool ControlErrorList::initialiseParams(string const & error_type)
{ {
error_type_ = error_type;
Buffer * buf = kernel().bufferview()->buffer(); Buffer * buf = kernel().bufferview()->buffer();
// FIXME UNICODE // FIXME UNICODE
docstring const title = bformat(_("%1$s Errors (%2$s)"), docstring const title = bformat(_("%1$s Errors (%2$s)"),
_(error_type), _(error_type),
lyx::from_utf8(buf->fileName())); lyx::from_utf8(buf->fileName()));
errorlist_ = buf->errorList(error_type);
name_ = lyx::to_utf8(title); name_ = lyx::to_utf8(title);
return true; return true;
} }
@ -70,7 +70,7 @@ string const & ControlErrorList::name()
void ControlErrorList::goTo(int item) void ControlErrorList::goTo(int item)
{ {
ErrorItem const & err = errorlist_[item]; ErrorItem const & err = errorList()[item];
if (err.par_id == -1) if (err.par_id == -1)
return; return;

View File

@ -41,7 +41,7 @@ public:
ErrorList const & errorList() const; ErrorList const & errorList() const;
private: private:
/// ///
ErrorList errorlist_; std::string error_type_;
/// ///
std::string name_; std::string name_;
}; };