]> git.lyx.org Git - features.git/commitdiff
Fix uninitialized members in Cursor and CursorData constructors
authorJean-Marc <lasgouttes@lyx.org>
Wed, 4 Mar 2015 22:00:07 +0000 (23:00 +0100)
committerJean-Marc <lasgouttes@lyx.org>
Wed, 4 Mar 2015 22:00:07 +0000 (23:00 +0100)
Fix coverity issues 23401, 23407, 23416 and 23429.

src/Cursor.cpp

index e30a5102dcba34d4d005942adbde3ea06ca689d2..fe6f0e4be1b303bfc7cd0342f81a24bf46f24c63 100644 (file)
@@ -240,21 +240,24 @@ bool bruteFind3(Cursor & cur, int x, int y, bool up)
 CursorData::CursorData()
        : DocIterator(), anchor_(),
          selection_(false), mark_(false), word_selection_(false),
-         logicalpos_(false), current_font(inherit_font)
+         logicalpos_(false), current_font(inherit_font),
+         autocorrect_(false), macromode_(false)
 {}
 
 
 CursorData::CursorData(Buffer * buffer)
        : DocIterator(buffer), anchor_(),
          selection_(false), mark_(false), word_selection_(false),
-         logicalpos_(false), current_font(inherit_font)
+         logicalpos_(false), current_font(inherit_font),
+         autocorrect_(false), macromode_(false)
 {}
 
 
 CursorData::CursorData(DocIterator const & dit)
        : DocIterator(dit), anchor_(),
          selection_(false), mark_(false), word_selection_(false),
-         logicalpos_(false), current_font(inherit_font)
+         logicalpos_(false), current_font(inherit_font),
+         autocorrect_(false), macromode_(false)
 {}
 
 
@@ -262,7 +265,8 @@ CursorData::CursorData(DocIterator const & dit)
 // bv functions are not yet available!
 Cursor::Cursor(BufferView & bv)
        : CursorData(&bv.buffer()), bv_(&bv),
-         x_target_(-1), textTargetOffset_(0)
+         x_target_(-1), textTargetOffset_(0),
+         beforeDispatchPosX_(0), beforeDispatchPosY_(0)
 {}