X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FUndo.h;h=b1908a25b322d798980faca3a803c001cf56f8cd;hb=4300feb8595c8542050adedf664cd4bfda7ede12;hp=1bd6450d7c3a03749952c322961a87c6d51e1099;hpb=b63421b7dc65e0c721f8928d1330b9bb2cff43d8;p=lyx.git diff --git a/src/Undo.h b/src/Undo.h index 1bd6450d7c..b1908a25b3 100644 --- a/src/Undo.h +++ b/src/Undo.h @@ -47,6 +47,9 @@ enum UndoKind { class Undo { + /// noncopyable + Undo(Undo const &); + void operator=(Undo const &); public: Undo(Buffer &); @@ -85,7 +88,7 @@ public: /** * This cursor takes precedence over what is passed to recordUndo. * In the case of nested groups, only the first cur_before is - * taken in account. The cursor is reset at the end of the + * taken into account. The cursor is reset at the end of the * top-level group. */ void beginUndoGroup(CursorData const & cur_before); @@ -132,15 +135,9 @@ private: */ class UndoGroupHelper { public: - UndoGroupHelper(Buffer * buf) : buffer_(0) - { - resetBuffer(buf); - } + UndoGroupHelper(Buffer * buf = 0); - ~UndoGroupHelper() - { - resetBuffer(0); - } + ~UndoGroupHelper(); /** Close the current undo group if necessary and create a new one * for buffer \c buf. @@ -148,7 +145,8 @@ public: void resetBuffer(Buffer * buf); private: - Buffer * buffer_; + class Impl; + Impl * const d; };