r21976 by craig - Coverity 1361812: Fix missing initialisation of member variables

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 22 18:42:16 UTC 2017


Author: craig
Date: Sat Apr 22 18:42:16 2017
New Revision: 21976

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21976
Log:
Coverity 1361812: Fix missing initialisation of member variables

Modified:
    trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp

Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21976&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp	Sat Apr 22 18:42:16 2017
@@ -40,12 +40,19 @@
 
 
 XtgScanner::XtgScanner(QString filename, PageItem *item, bool textOnly, bool prefix, bool append)
-{
-	m_item = item;
-	importTextOnly = textOnly;
-	m_append = append;
+	: m_item(item),
+	  importTextOnly(textOnly),
+	  m_prefixName(prefix),
+	  m_append(append),
+	  newlineFlag(false),
+	  xflag(false),
+	  inDef(false),
+	  top(0),
+	  define(0),
+	  m_isBold(false),
+	  m_isItalic(false)
+{
 	loadRawBytes(filename, input_Buffer);
-	top = 0;
 	if ((input_Buffer[0] == '\xFF') && (input_Buffer[1] == '\xFE'))
 	{
 		QByteArray tmpBuf;
@@ -61,18 +68,13 @@
 	initNameMode();
 	initLanguages();
 	prevMode = textMode;
-	textToAppend = "";
-	define = 0;
 	styleEffects = ScStyle_None;
 	m_codecList = QTextCodec::availableCodecs();
 	if (m_codecList.contains("cp1252"))
 		m_codec = QTextCodec::codecForName("cp1252");		// Default ANSI codec
 	else
 		m_codec = QTextCodec::codecForLocale();
-	m_isBold = false;
-	m_isItalic = false;
-	inDef = false;
-	m_prefixName = prefix;
+
 }
 
 /** Initialise a QHash which maps the values of n## to corresponding language strings




More information about the scribus-commit mailing list