On Fri, Oct 12, 2007 at 09:06:00PM -0700, Angus Leeming wrote: > [EMAIL PROTECTED] wrote: > > BufferView::BufferView(Buffer & buf) > > - : width_(0), height_(0), buffer_(buf), wh_(0), > > - cursor_(*this), > > - multiparsel_cache_(false), anchor_ref_(0), offset_ref_(0), > > - need_centering_(false), intl_(new Intl), last_inset_(0), > > - gui_(0) > > -{ > > - xsel_cache_.set = false; > > - intl_->initKeyMapper(lyxrc.use_kbmap); > > - > > - cursor_.push(buffer_.inset()); > > - cursor_.resetAnchor(); > > - cursor_.setCurrentFont(); > > + : width_(0), height_(0), buffer_(buf), d(*new BufferViewPrivate(*this)) > > Oh, c'mon! Please! If it's a pointer, it's a pointer. Don't make it > something it isn't. > > > @@ -372,7 +424,33 @@ > > // restore to the left of the top level inset. > > LyX::ref().session().lastFilePos().save( > > support::FileName(buffer_.fileName()), > > - boost::tie(cursor_.bottom().pit(), cursor_.bottom().pos()) ); > > + boost::tie(d.cursor_.bottom().pit(), d.cursor_.bottom().pos()) > > ); > > + > > + delete &d; > > I rest my case. If you want reference semantics (and given that this is > private, there's no need for that), then either put 'd' on the stack or use > an accessor. > > Angus
Didn't we have pimpl for this? And didn't we get rid of it for some (good?) reason? - Martin