From 33b2fb5ed0ffc7ce035d03db50c00f7751c69d92 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 5 Jan 2023 15:14:13 +0200 Subject: [PATCH] Fix GCC warnings. --- src/libs/vdxf/libdxfrw/drw_base.h | 8 ++++---- src/libs/vdxf/libdxfrw/drw_entities.h | 8 ++++---- src/libs/vdxf/libdxfrw/drw_objects.h | 4 ++-- src/libs/vdxf/libdxfrw/intern/dxfreader.h | 2 +- src/libs/vobj/delaunay.cpp | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/libs/vdxf/libdxfrw/drw_base.h b/src/libs/vdxf/libdxfrw/drw_base.h index b995b0435..56be2dbd9 100644 --- a/src/libs/vdxf/libdxfrw/drw_base.h +++ b/src/libs/vdxf/libdxfrw/drw_base.h @@ -466,7 +466,7 @@ public: void addDouble(double d) {setType(DOUBLE); content.d = d;} void addCoord() {setType(COORD); vdata.x=0.0; vdata.y=0.0; vdata.z=0.0; content.v = &vdata;} void addCoord(const DRW_Coord &v) {setType(COORD); vdata = v; content.v = &vdata;} - void setType(enum TYPE t) { type = t;} + void setType(TYPE t) { type = t;} void setCoordX(double d) { if (type == COORD) vdata.x = d;} void setCoordY(double d) { if (type == COORD) vdata.y = d;} void setCoordZ(double d) { if (type == COORD) vdata.z = d;} @@ -481,7 +481,7 @@ private: public: DRW_VarContent content; - enum TYPE type; + TYPE type; int code; /*!< dxf code of this value*/ private: @@ -529,7 +529,7 @@ public: widthDefault = 31 /*!< by default (dxf -3) */ }; - static int lineWidth2dxfInt(enum lineWidth lw){ + static int lineWidth2dxfInt(lineWidth lw){ switch (lw){ case widthByLayer: return -1; @@ -591,7 +591,7 @@ public: return -3; } - static enum lineWidth dxfInt2lineWidth(int i){ + static lineWidth dxfInt2lineWidth(int i){ if (i<0) { if (i==-1) return widthByLayer; diff --git a/src/libs/vdxf/libdxfrw/drw_entities.h b/src/libs/vdxf/libdxfrw/drw_entities.h index 6e5afcd97..a7b522623 100644 --- a/src/libs/vdxf/libdxfrw/drw_entities.h +++ b/src/libs/vdxf/libdxfrw/drw_entities.h @@ -194,7 +194,7 @@ protected: bool parseDxfGroups(int code, dxfReader *reader); public: - enum DRW::ETYPE eType; /*!< enum: entity type, code 0 */ + DRW::ETYPE eType; /*!< enum: entity type, code 0 */ duint32 handle; /*!< entity identifier, code 5 */ std::list > appData; /*!< list of application data, code 102 */ duint32 parentHandle; /*!< Soft-pointer ID/handle to owner BLOCK_RECORD object, code 330 */ @@ -203,7 +203,7 @@ public: UTF8STRING lineType; /*!< line type, code 6 */ duint32 material; /*!< hard pointer id to material object, code 347 */ int color; /*!< entity color, code 62 */ - enum DRW_LW_Conv::lineWidth lWeight; /*!< entity lineweight, code 370 */ + DRW_LW_Conv::lineWidth lWeight; /*!< entity lineweight, code 370 */ double ltypeScale; /*!< linetype scale, code 48 */ bool visible; /*!< entity visibility, code 60 */ int numProxyGraph; /*!< Number of bytes in proxy graphics, code 92 */ @@ -709,8 +709,8 @@ public: double oblique; /*!< oblique angle, code 51 */ UTF8STRING style; /*!< style name, code 7 */ int textgen; /*!< text generation, code 71 */ - enum HAlign alignH; /*!< horizontal align, code 72 */ - enum VAlign alignV; /*!< vertical align, code 73 */ + HAlign alignH; /*!< horizontal align, code 72 */ + VAlign alignV; /*!< vertical align, code 73 */ }; //! Class to handle insert entries diff --git a/src/libs/vdxf/libdxfrw/drw_objects.h b/src/libs/vdxf/libdxfrw/drw_objects.h index c908df6bc..992d31033 100644 --- a/src/libs/vdxf/libdxfrw/drw_objects.h +++ b/src/libs/vdxf/libdxfrw/drw_objects.h @@ -104,7 +104,7 @@ protected: } public: - enum DRW::TTYPE tType {DRW::UNKNOWNT}; /*!< enum: entity type, code 0 */ + DRW::TTYPE tType {DRW::UNKNOWNT}; /*!< enum: entity type, code 0 */ duint32 handle {0}; /*!< entity identifier, code 5 */ int parentHandle {0}; /*!< Soft-pointer ID/handle to owner object, code 330 */ UTF8STRING name{}; /*!< entry name, code 2 */ @@ -381,7 +381,7 @@ public: int color; /*!< layer color, code 62 */ int color24; /*!< 24-bit color, code 420 */ bool plotF; /*!< Plot flag, code 290 */ - enum DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */ + DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */ std::string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ std::string handleMaterialS; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ }; diff --git a/src/libs/vdxf/libdxfrw/intern/dxfreader.h b/src/libs/vdxf/libdxfrw/intern/dxfreader.h index fda528dd7..7b3f0d6f9 100644 --- a/src/libs/vdxf/libdxfrw/intern/dxfreader.h +++ b/src/libs/vdxf/libdxfrw/intern/dxfreader.h @@ -26,7 +26,7 @@ public: BOOL, INVALID }; - enum TYPE type; + TYPE type; public: explicit dxfReader(std::istream *stream) : type(INVALID), diff --git a/src/libs/vobj/delaunay.cpp b/src/libs/vobj/delaunay.cpp index 6f96d10e6..e1a6a4d2f 100644 --- a/src/libs/vobj/delaunay.cpp +++ b/src/libs/vobj/delaunay.cpp @@ -71,10 +71,10 @@ struct point2d_s; #define EPSILON (REAL_ONE / TOLERANCE) -typedef struct point2d_s point2d_t; -typedef struct face_s face_t; -typedef struct halfedge_s halfedge_t; -typedef struct delaunay_s delaunay_t; +typedef point2d_s point2d_t; +typedef face_s face_t; +typedef halfedge_s halfedge_t; +typedef delaunay_s delaunay_t; typedef real mat3_t[3][3]; struct point2d_s