Remove unnecessary typedefs or replace with using.
This commit is contained in:
@@ -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[] =
|
||||
{
|
||||
|
||||
@@ -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 } },
|
||||
|
||||
@@ -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
@@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user