Remove read_only parameter from newBuffer

This parameter defaults to false and it is never set to true. So, we can
better remove the parameter.
This commit is contained in:
Vincent van Ravesteijn 2012-05-12 13:54:20 +02:00
parent 366b21d4d3
commit fa438c1699
3 changed files with 4 additions and 4 deletions

View File

@ -104,11 +104,11 @@ void BufferList::release(Buffer * buf)
}
Buffer * BufferList::newBuffer(string const & s, bool const ronly)
Buffer * BufferList::newBuffer(string const & s)
{
auto_ptr<Buffer> tmpbuf;
try {
tmpbuf.reset(new Buffer(s, ronly));
tmpbuf.reset(new Buffer(s));
} catch (ExceptionMessage const & message) {
if (message.type_ == ErrorException) {
Alert::error(message.title_, message.details_);

View File

@ -49,7 +49,7 @@ public:
/// create a new buffer
/// \return 0 if the Buffer creation is not possible for whatever reason.
Buffer * newBuffer(std::string const & s, bool ronly = false);
Buffer * newBuffer(std::string const & s);
/// delete a buffer
void release(Buffer * b);

View File

@ -511,7 +511,7 @@ bool LyX::loadFiles()
if (fname.empty())
continue;
Buffer * buf = pimpl_->buffer_list_.newBuffer(fname.absFileName(), false);
Buffer * buf = pimpl_->buffer_list_.newBuffer(fname.absFileName());
if (buf->loadLyXFile() == Buffer::ReadSuccess) {
ErrorList const & el = buf->errorList("Parse");
if (!el.empty())