[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