mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
366b21d4d3
commit
fa438c1699
@ -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_);
|
||||
|
@ -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);
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user