]> git.lyx.org Git - features.git/commitdiff
iInitialize a few variables in TextClass constructor
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 12 Sep 2015 21:11:35 +0000 (23:11 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Sat, 12 Sep 2015 21:11:35 +0000 (23:11 +0200)
Also use proper initializers and reorder members properly.

Coverity issue 23385

src/TextClass.cpp

index b2b42f5203e7df9e6f7cb0c18baa327712a7ac81..60fab48e6ca54abe2b73d1df844b6241b7a05fbe 100644 (file)
@@ -139,22 +139,16 @@ InsetLayout DocumentClass::plain_insetlayout_;
 /////////////////////////////////////////////////////////////////////////
 
 TextClass::TextClass()
+       : loaded_(false), tex_class_avail_(false),
+         opt_enginetype_("authoryear|numerical"), opt_fontsize_("10|11|12"),
+         opt_pagestyle_("empty|plain|headings|fancy"), pagestyle_("default"),
+         columns_(1), sides_(OneSide), secnumdepth_(3), tocdepth_(3),
+         outputType_(LATEX), outputFormat_("latex"),
+         defaultfont_(sane_font),
+         titletype_(TITLE_COMMAND_AFTER), titlename_("maketitle"),
+         min_toclevel_(0), max_toclevel_(0),
+         cite_full_author_list_(true)
 {
-       outputType_ = LATEX;
-       outputFormat_ = "latex";
-       columns_ = 1;
-       sides_ = OneSide;
-       secnumdepth_ = 3;
-       tocdepth_ = 3;
-       pagestyle_ = "default";
-       defaultfont_ = sane_font;
-       opt_enginetype_ = "authoryear|numerical";
-       opt_fontsize_ = "10|11|12";
-       opt_pagestyle_ = "empty|plain|headings|fancy";
-       cite_full_author_list_ = true;
-       titletype_ = TITLE_COMMAND_AFTER;
-       titlename_ = "maketitle";
-       loaded_ = false;
 }