mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Add missing intializations
These were found by cppcheck: Member variable 'x' is not initialized in the constructor. The crash #9788 would not have happened if this had been done earlier.
This commit is contained in:
parent
96f64ac028
commit
8a047a4112
@ -234,7 +234,9 @@ struct BufferView::Private
|
||||
mouse_position_cache_(),
|
||||
bookmark_edit_position_(-1), gui_(0),
|
||||
horiz_scroll_offset_(0)
|
||||
{}
|
||||
{
|
||||
xsel_cache_.set = false;
|
||||
}
|
||||
|
||||
///
|
||||
ScrollbarParameters scrollbarParameters_;
|
||||
|
@ -429,10 +429,9 @@ tex_accent getkeymod(string const & p)
|
||||
|
||||
|
||||
// TransFSMData
|
||||
TransFSMData::TransFSMData()
|
||||
TransFSMData::TransFSMData() : deadkey_(0), deadkey2_(0), init_state_(0),
|
||||
deadkey_state_(0), combined_state_(0), currentState(0)
|
||||
{
|
||||
deadkey_ = deadkey2_ = 0;
|
||||
deadkey_info_.accent = deadkey2_info_.accent = TEX_NOACCENT;
|
||||
}
|
||||
|
||||
|
||||
|
@ -90,6 +90,8 @@ extern TeXAccent get_accent(FuncCode action);
|
||||
|
||||
///
|
||||
struct Keyexc {
|
||||
///
|
||||
Keyexc() : c('\0'), combined(false), accent(TEX_NOACCENT) {}
|
||||
/// character to make exception
|
||||
char_type c;
|
||||
/// exception data
|
||||
@ -106,6 +108,8 @@ typedef std::list<Keyexc> KmodException;
|
||||
///
|
||||
class KmodInfo {
|
||||
public:
|
||||
///
|
||||
KmodInfo() : accent(TEX_NOACCENT) {}
|
||||
///
|
||||
docstring data;
|
||||
///
|
||||
|
@ -132,7 +132,9 @@ namespace frontend {
|
||||
|
||||
class CursorWidget {
|
||||
public:
|
||||
CursorWidget() {
|
||||
CursorWidget() : rtl_(false), l_shape_(false), completable_(false),
|
||||
show_(false), x_(0), cursor_width_(0)
|
||||
{
|
||||
recomputeWidth();
|
||||
}
|
||||
|
||||
@ -244,10 +246,11 @@ SyntheticMouseEvent::SyntheticMouseEvent()
|
||||
|
||||
|
||||
GuiWorkArea::Private::Private(GuiWorkArea * parent)
|
||||
: p(parent), screen_(0), buffer_view_(0), lyx_view_(0), cursor_visible_(false),
|
||||
: p(parent), screen_(0), buffer_view_(0), read_only_(false), lyx_view_(0),
|
||||
cursor_visible_(false), cursor_(0),
|
||||
need_resize_(false), schedule_redraw_(false), preedit_lines_(1),
|
||||
pixel_ratio_(1.0),
|
||||
completer_(new GuiCompleter(p, p))
|
||||
completer_(new GuiCompleter(p, p)), dialog_mode_(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -43,13 +43,13 @@ static docstring convertDelimToLatexName(docstring const & name)
|
||||
|
||||
InsetMathDelim::InsetMathDelim(Buffer * buf, docstring const & l,
|
||||
docstring const & r)
|
||||
: InsetMathNest(buf, 1), left_(l), right_(r)
|
||||
: InsetMathNest(buf, 1), left_(l), right_(r), dw_(0)
|
||||
{}
|
||||
|
||||
|
||||
InsetMathDelim::InsetMathDelim(Buffer * buf, docstring const & l, docstring const & r,
|
||||
MathData const & ar)
|
||||
: InsetMathNest(buf, 1), left_(l), right_(r)
|
||||
: InsetMathNest(buf, 1), left_(l), right_(r), dw_(0)
|
||||
{
|
||||
cell(0) = ar;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace lyx {
|
||||
|
||||
InsetMathDots::InsetMathDots(latexkeys const * key)
|
||||
: key_(key)
|
||||
: dh_(0), key_(key)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -81,7 +81,7 @@ static void resetGrid(InsetMathGrid & grid)
|
||||
|
||||
|
||||
InsetMathGrid::CellInfo::CellInfo()
|
||||
: multi_(CELL_NORMAL)
|
||||
: multi_(CELL_NORMAL), glue_(0), begin_(0), end_(0)
|
||||
{}
|
||||
|
||||
|
||||
@ -90,7 +90,8 @@ InsetMathGrid::CellInfo::CellInfo()
|
||||
|
||||
|
||||
InsetMathGrid::RowInfo::RowInfo()
|
||||
: lines_(0), skip_(0), allow_newpage_(true)
|
||||
: descent_(0), ascent_(0), offset_(0), lines_(0), skip_(0),
|
||||
allow_newpage_(true)
|
||||
{}
|
||||
|
||||
|
||||
@ -106,7 +107,7 @@ int InsetMathGrid::RowInfo::skipPixels(MetricsInfo const & mi) const
|
||||
|
||||
|
||||
InsetMathGrid::ColInfo::ColInfo()
|
||||
: align_('c'), lines_(0), skip_(0)
|
||||
: align_('c'), width_(0), offset_(0), lines_(0), skip_(0)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -23,7 +23,8 @@ namespace lyx {
|
||||
|
||||
InsetMathUnknown::InsetMathUnknown(docstring const & nm,
|
||||
docstring const & selection, bool final, bool black)
|
||||
: name_(nm), final_(final), black_(black), selection_(selection)
|
||||
: name_(nm), final_(final), black_(black), kerning_(0),
|
||||
selection_(selection)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace lyx {
|
||||
|
||||
|
||||
InsetMathXYArrow::InsetMathXYArrow()
|
||||
: InsetMathNest(2)
|
||||
: InsetMathNest(2), up_(false), target_(0)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ private:
|
||||
|
||||
int flush_buffer();
|
||||
public:
|
||||
gzstreambuf() : opened(0) {
|
||||
gzstreambuf() : opened(0), mode(0) {
|
||||
setp( buffer, buffer + (bufferSize-1));
|
||||
setg( buffer + 4, // beginning of putback area
|
||||
buffer + 4, // read position
|
||||
|
@ -144,7 +144,7 @@ public:
|
||||
class ltType {
|
||||
public:
|
||||
// constructor
|
||||
ltType() : topDL(false), bottomDL(false), empty(false) {}
|
||||
ltType() : set(false), topDL(false), bottomDL(false), empty(false) {}
|
||||
// we have this header type (is set in the getLT... functions)
|
||||
bool set;
|
||||
// double borders on top
|
||||
|
Loading…
Reference in New Issue
Block a user