r24343 by jghali - Code cleanup

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 22 00:18:00 UTC 2020


Author: jghali
Date: Tue Dec 22 00:18:00 2020
New Revision: 24343

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24343
Log:
Code cleanup

Modified:
    trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
    trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.h

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24343&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp	(original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.cpp	Tue Dec 22 00:18:00 2020
@@ -43,18 +43,6 @@
 	sreader = s;
 	writer  = w;
 	importTextOnly = textOnly;
-	defaultStyle = nullptr;
-	currentStyle = nullptr;
-	inList = false;
-	inNote = false;
-	inNoteBody = false;
-	inSpan = false;
-	append    = 0;
-	listIndex = 0;
-	listLevel = 0;
-	currentList = "";
-	inT = false;
-	tName = "";
 }
 
 bool ContentReader::startElement(const QString &name, const SXWAttributesMap &attrs) 

Modified: trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24343&path=/trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.h
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.h	(original)
+++ trunk/Scribus/scribus/plugins/gettext/sxwim/contentreader.h	Tue Dec 22 00:18:00 2020
@@ -69,26 +69,27 @@
 
 	TMap tmap;
 	QString docname;
-	StyleReader* sreader;
-	gtWriter *writer;
-	gtStyle *defaultStyle;
-	gtStyle *currentStyle;
-	gtStyle *lastStyle;
-	gtStyle *pstyle;
+	StyleReader* sreader { nullptr };
+	gtWriter *writer { nullptr };
+	gtStyle *defaultStyle { nullptr };
+	gtStyle *currentStyle { nullptr };
+	gtStyle *lastStyle { nullptr };
+	gtStyle *pstyle { nullptr };
 	bool importTextOnly;
-	bool inList;
-	bool inNote;
-	bool inNoteBody;
-	bool inSpan;
-	int  append;
-	int  listLevel;
-	int  listIndex;
+	bool inList { false };
+	bool inNote { false };
+	bool inNoteBody { false };
+	bool inSpan { false };
+	int  append { 0 };
+	int  listLevel { 0 };
+	int  listIndex { 0 };
 	std::vector<int> listIndex2;
 	std::vector<bool> isOrdered2;
-	bool inT;
+	bool inT { false };
 	std::vector<QString> styleNames;
 	QString tName;
 	QString currentList;
+
 	void write(const QString& text);
 	QString getName();
 	void getStyle();




More information about the scribus-commit mailing list