diff --git a/backends/merge/Factory.h b/backends/merge/Factory.h index 13e81ee..4f666d9 100644 --- a/backends/merge/Factory.h +++ b/backends/merge/Factory.h @@ -77,7 +77,7 @@ namespace glabels // private methods ///////////////////////////////// private: - typedef Merge* (*CreateFct)(); + using CreateFct = Merge* (*)(); static void registerBackend( const QString& id, const QString& name, diff --git a/glabels/ColorPaletteDialog.h b/glabels/ColorPaletteDialog.h index 5bc8379..db5f7e1 100644 --- a/glabels/ColorPaletteDialog.h +++ b/glabels/ColorPaletteDialog.h @@ -101,10 +101,10 @@ namespace glabels static const int PALETTE_COLS = ColorHistory::MAX_COLORS; static const int PALETTE_ROWS = 4; - typedef struct { + struct ColorTableEntry { QString colorSpec; const char* trname; - } ColorTableEntry; + }; static ColorTableEntry mColorTable[]; diff --git a/glbarcode/BarcodeDataMatrix.cpp b/glbarcode/BarcodeDataMatrix.cpp index f78393d..8d09faa 100644 --- a/glbarcode/BarcodeDataMatrix.cpp +++ b/glbarcode/BarcodeDataMatrix.cpp @@ -40,7 +40,7 @@ namespace const uint8_t CW_UPSHIFT = 235; - typedef struct + struct DMParameterEntry { int nDataTotal; int nXtotal; @@ -55,7 +55,7 @@ namespace int nYregions; int nXregion; int nYregion; - } DMParameterEntry; + }; const DMParameterEntry params[] = { diff --git a/glbarcode/BarcodeOnecode.cpp b/glbarcode/BarcodeOnecode.cpp index ebb4cdf..f7cbd8d 100644 --- a/glbarcode/BarcodeOnecode.cpp +++ b/glbarcode/BarcodeOnecode.cpp @@ -51,7 +51,7 @@ namespace /* * Encoding tables */ - typedef enum + enum Char { CHAR_A = 0, CHAR_B = 1, @@ -63,15 +63,19 @@ namespace CHAR_H = 7, CHAR_I = 8, CHAR_J = 9 - } Char; + }; - typedef struct { Char i; int mask; } Bar; + struct Bar + { + Char i; + int mask; + }; - typedef struct + struct BarMapEntry { Bar descender; Bar ascender; - } BarMapEntry; + }; const BarMapEntry barMap[] = { /* 1 */ { { CHAR_H, 1<<2 }, { CHAR_E, 1<<3 } }, diff --git a/glbarcode/BarcodeUpcBase.cpp b/glbarcode/BarcodeUpcBase.cpp index 1b0adfe..e5da6a4 100644 --- a/glbarcode/BarcodeUpcBase.cpp +++ b/glbarcode/BarcodeUpcBase.cpp @@ -61,7 +61,7 @@ namespace /* * Parity selection */ - typedef enum { P_ODD, P_EVEN } Parity; + enum Parity { P_ODD, P_EVEN }; const Parity parity[10][6] = { /* Pos 1, Pos 2, Pos 3, Pos 4, Pos 5, Pos 6 */ diff --git a/glbarcode/Factory.h b/glbarcode/Factory.h index 97697ad..7a663d4 100644 --- a/glbarcode/Factory.h +++ b/glbarcode/Factory.h @@ -48,7 +48,7 @@ namespace glbarcode /** * Barcode creation function signature. */ - typedef Barcode* (*BarcodeCreateFct)(); + using BarcodeCreateFct = Barcode* (*)(); private: @@ -113,7 +113,7 @@ namespace glbarcode /** * Map barcode type strings to creation functions. */ - typedef std::map BarcodeTypeMap; + using BarcodeTypeMap = std::map; static BarcodeTypeMap mBarcodeTypeMap;