From 1e32012649d1843397fc713973946252b87e7c16 Mon Sep 17 00:00:00 2001 From: "Martin T. H. Sandsmark" Date: Sun, 24 Jul 2016 20:38:17 +0200 Subject: [PATCH] Fix warnings about using struct for classes --- generators/dvi/TeXFont_PFB.cpp | 2 +- generators/dvi/dvisourcesplitter.h | 1 - generators/fax/faxdocument.cpp | 6 +++--- generators/fax/faxexpand.cpp | 10 +++++----- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/generators/dvi/TeXFont_PFB.cpp b/generators/dvi/TeXFont_PFB.cpp index 0bb42c7d0..b8d0f6498 100644 --- a/generators/dvi/TeXFont_PFB.cpp +++ b/generators/dvi/TeXFont_PFB.cpp @@ -151,7 +151,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo } // This is the address of the glyph that will be returned. - struct glyph *g = glyphtable+ch; + glyph *g = glyphtable+ch; if (fatalErrorInFontLoading == true) diff --git a/generators/dvi/dvisourcesplitter.h b/generators/dvi/dvisourcesplitter.h index 2bc2a2ea0..bc3d3b3a4 100644 --- a/generators/dvi/dvisourcesplitter.h +++ b/generators/dvi/dvisourcesplitter.h @@ -28,6 +28,5 @@ public: private: QFileInfo m_fileInfo; quint32 m_line; - bool m_exists; }; #endif diff --git a/generators/fax/faxdocument.cpp b/generators/fax/faxdocument.cpp index ed586322c..0ccb99455 100644 --- a/generators/fax/faxdocument.cpp +++ b/generators/fax/faxdocument.cpp @@ -19,7 +19,7 @@ static const char FAXMAGIC[] = "\000PC Research, Inc\000\000\000\000\000\000"; #define FAX_DPI_FINE QPoint(203,196) /* rearrange input bits into t16bits lsb-first chunks */ -static void normalize( struct pagenode *pn, int revbits, int swapbytes, size_t length ) +static void normalize( pagenode *pn, int revbits, int swapbytes, size_t length ) { t32bits *p = (t32bits *) pn->data; @@ -205,7 +205,7 @@ static void draw_line( pixnum *run, int lineNum, pagenode *pn ) } } -static bool get_image( struct pagenode *pn ) +static bool get_image( pagenode *pn ) { unsigned char *data = getstrip( pn, 0 ); if ( !data ) @@ -229,7 +229,7 @@ class FaxDocument::Private } FaxDocument *mParent; - struct pagenode mPageNode; + pagenode mPageNode; FaxDocument::DocumentType mType; }; diff --git a/generators/fax/faxexpand.cpp b/generators/fax/faxexpand.cpp index 101bbc0b4..999ee64a8 100644 --- a/generators/fax/faxexpand.cpp +++ b/generators/fax/faxexpand.cpp @@ -343,7 +343,7 @@ unexpected(const char *what, int LineNum) /* Expand tiff modified huffman data (g3-1d without EOLs) */ void -MHexpand(struct pagenode *pn, drawfunc df) +MHexpand(pagenode *pn, drawfunc df) { int a0; /* reference element */ int lastx; /* copy line width to register */ @@ -396,7 +396,7 @@ MHexpand(struct pagenode *pn, drawfunc df) /* Expand group-3 1-dimensional data */ void -g31expand(struct pagenode *pn, drawfunc df) +g31expand(pagenode *pn, drawfunc df) { int a0; /* reference element */ int lastx; /* copy line width to register */ @@ -480,7 +480,7 @@ g31expand(struct pagenode *pn, drawfunc df) /* Expand group-3 2-dimensional data */ void -g32expand(struct pagenode *pn, drawfunc df) +g32expand(pagenode *pn, drawfunc df) { int RunLength; /* Length of current run */ int a0; /* reference element */ @@ -600,7 +600,7 @@ g32expand(struct pagenode *pn, drawfunc df) /* Expand group-4 data */ void -g4expand(struct pagenode *pn, drawfunc df) +g4expand(pagenode *pn, drawfunc df) { int RunLength; /* Length of current run */ int a0; /* reference element */ @@ -717,7 +717,7 @@ static const unsigned char zerotab[256] = { /* count fax lines */ int -G3count(struct pagenode *pn, int twoD) +G3count(pagenode *pn, int twoD) { t16bits *p = pn->data; t16bits *end = p + pn->length/sizeof(*p);