r24721 by jghali - Code cleanup
scribus-commit
scribus-commit at lists.scribus.net
Sun Oct 3 02:57:19 UTC 2021
Author: jghali
Date: Sun Oct 3 02:54:44 2021
New Revision: 24721
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24721
Log:
Code cleanup
Modified:
trunk/Scribus/scribus/palettes/cxfcolorspecification.cpp
trunk/Scribus/scribus/palettes/cxfcolorspecification.h
trunk/Scribus/scribus/palettes/cxfdocument.cpp
trunk/Scribus/scribus/palettes/cxfdocument.h
trunk/Scribus/scribus/palettes/cxfmeasurementspec.cpp
trunk/Scribus/scribus/palettes/cxfmeasurementspec.h
trunk/Scribus/scribus/palettes/cxfobject.cpp
trunk/Scribus/scribus/palettes/cxfobject.h
Modified: trunk/Scribus/scribus/palettes/cxfcolorspecification.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfcolorspecification.cpp
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfcolorspecification.cpp (original)
+++ trunk/Scribus/scribus/palettes/cxfcolorspecification.cpp Sun Oct 3 02:54:44 2021
@@ -6,12 +6,6 @@
*/
#include "cxfcolorspecification.h"
-
-CxfColorSpecification::CxfColorSpecification()
-{
- m_hasMeasurementSpec = false;
- m_hasTristimulusSpec = false;
-}
bool CxfColorSpecification::isValid() const
{
Modified: trunk/Scribus/scribus/palettes/cxfcolorspecification.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfcolorspecification.h
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfcolorspecification.h (original)
+++ trunk/Scribus/scribus/palettes/cxfcolorspecification.h Sun Oct 3 02:54:44 2021
@@ -18,7 +18,7 @@
class CxfColorSpecification
{
public:
- CxfColorSpecification();
+ CxfColorSpecification() = default;
const QString& id() const { return m_id; }
@@ -37,8 +37,8 @@
protected:
QString m_id;
- bool m_hasMeasurementSpec;
- bool m_hasTristimulusSpec;
+ bool m_hasMeasurementSpec { false };
+ bool m_hasTristimulusSpec { false };
CxfMeasurementSpec m_measurementSpec;
CxfTristimulusSpec m_tristimulusSpec;
Modified: trunk/Scribus/scribus/palettes/cxfdocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfdocument.cpp
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfdocument.cpp (original)
+++ trunk/Scribus/scribus/palettes/cxfdocument.cpp Sun Oct 3 02:54:44 2021
@@ -107,7 +107,7 @@
if (childElem.tagName() != "Object")
continue;
- CxfObject* object = new CxfObject(this);
+ auto* object = new CxfObject(this);
if (!object->parse(childElem))
{
delete object;
Modified: trunk/Scribus/scribus/palettes/cxfdocument.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfdocument.h
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfdocument.h (original)
+++ trunk/Scribus/scribus/palettes/cxfdocument.h Sun Oct 3 02:54:44 2021
@@ -28,7 +28,7 @@
int objectCount() const { return m_objects.count(); }
const CxfObject* objectAt(int index) const { return m_objects.at(index); }
- const QList<CxfObject*>& objects() { return m_objects; }
+ const QList<CxfObject*>& objects() const { return m_objects; }
bool parse(const QString& fileName);
void reset();
Modified: trunk/Scribus/scribus/palettes/cxfmeasurementspec.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfmeasurementspec.cpp
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfmeasurementspec.cpp (original)
+++ trunk/Scribus/scribus/palettes/cxfmeasurementspec.cpp Sun Oct 3 02:54:44 2021
@@ -10,9 +10,7 @@
CxfMeasurementSpec::CxfMeasurementSpec()
{
- m_measurementType = cxfMeasurementUnknown;
- m_waveLengthStart = 0;
- m_waveLengthIncrement = 0;
+
}
bool CxfMeasurementSpec::hasWavelengthRange() const
Modified: trunk/Scribus/scribus/palettes/cxfmeasurementspec.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfmeasurementspec.h
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfmeasurementspec.h (original)
+++ trunk/Scribus/scribus/palettes/cxfmeasurementspec.h Sun Oct 3 02:54:44 2021
@@ -33,9 +33,9 @@
static QVector<int> wavelengths(int start, int increment, int count);
protected:
- CxfMeasurementType m_measurementType;
- int m_waveLengthStart;
- int m_waveLengthIncrement;
+ CxfMeasurementType m_measurementType { cxfMeasurementUnknown };
+ int m_waveLengthStart { 0 };
+ int m_waveLengthIncrement { 0 };
};
#endif
Modified: trunk/Scribus/scribus/palettes/cxfobject.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfobject.cpp
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfobject.cpp (original)
+++ trunk/Scribus/scribus/palettes/cxfobject.cpp Sun Oct 3 02:54:44 2021
@@ -10,8 +10,9 @@
#include "cxfobject.h"
CxfObject::CxfObject(CxfDocument* cxfDoc)
+ : m_cxfDoc(cxfDoc)
{
- m_cxfDoc = cxfDoc;
+
}
const CxfColor* CxfObject::color(CxfColorType type) const
Modified: trunk/Scribus/scribus/palettes/cxfobject.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24721&path=/trunk/Scribus/scribus/palettes/cxfobject.h
==============================================================================
--- trunk/Scribus/scribus/palettes/cxfobject.h (original)
+++ trunk/Scribus/scribus/palettes/cxfobject.h Sun Oct 3 02:54:44 2021
@@ -34,7 +34,7 @@
bool parse(QDomElement& elem);
protected:
- CxfDocument* m_cxfDoc;
+ CxfDocument* m_cxfDoc { nullptr };
QString m_id;
QString m_name;
More information about the scribus-commit
mailing list