Remove unnecessary typedefs or replace with using.

This commit is contained in:
Jim Evins
2017-12-30 18:42:26 -05:00
parent b11754462f
commit c7a6ed4917
6 changed files with 17 additions and 13 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ namespace glabels
// private methods
/////////////////////////////////
private:
typedef Merge* (*CreateFct)();
using CreateFct = Merge* (*)();
static void registerBackend( const QString& id,
const QString& name,
+2 -2
View File
@@ -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[];
+2 -2
View File
@@ -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[] =
{
+9 -5
View File
@@ -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 } },
+1 -1
View File
@@ -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 */
+2 -2
View File
@@ -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<std::string,BarcodeCreateFct> BarcodeTypeMap;
using BarcodeTypeMap = std::map<std::string,BarcodeCreateFct>;
static BarcodeTypeMap mBarcodeTypeMap;