Remove unnecessary typedefs or replace with using.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace glabels
|
|||||||
// private methods
|
// private methods
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
private:
|
private:
|
||||||
typedef Merge* (*CreateFct)();
|
using CreateFct = Merge* (*)();
|
||||||
|
|
||||||
static void registerBackend( const QString& id,
|
static void registerBackend( const QString& id,
|
||||||
const QString& name,
|
const QString& name,
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ namespace glabels
|
|||||||
static const int PALETTE_COLS = ColorHistory::MAX_COLORS;
|
static const int PALETTE_COLS = ColorHistory::MAX_COLORS;
|
||||||
static const int PALETTE_ROWS = 4;
|
static const int PALETTE_ROWS = 4;
|
||||||
|
|
||||||
typedef struct {
|
struct ColorTableEntry {
|
||||||
QString colorSpec;
|
QString colorSpec;
|
||||||
const char* trname;
|
const char* trname;
|
||||||
} ColorTableEntry;
|
};
|
||||||
|
|
||||||
static ColorTableEntry mColorTable[];
|
static ColorTableEntry mColorTable[];
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace
|
|||||||
const uint8_t CW_UPSHIFT = 235;
|
const uint8_t CW_UPSHIFT = 235;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
struct DMParameterEntry
|
||||||
{
|
{
|
||||||
int nDataTotal;
|
int nDataTotal;
|
||||||
int nXtotal;
|
int nXtotal;
|
||||||
@@ -55,7 +55,7 @@ namespace
|
|||||||
int nYregions;
|
int nYregions;
|
||||||
int nXregion;
|
int nXregion;
|
||||||
int nYregion;
|
int nYregion;
|
||||||
} DMParameterEntry;
|
};
|
||||||
|
|
||||||
const DMParameterEntry params[] =
|
const DMParameterEntry params[] =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace
|
|||||||
/*
|
/*
|
||||||
* Encoding tables
|
* Encoding tables
|
||||||
*/
|
*/
|
||||||
typedef enum
|
enum Char
|
||||||
{
|
{
|
||||||
CHAR_A = 0,
|
CHAR_A = 0,
|
||||||
CHAR_B = 1,
|
CHAR_B = 1,
|
||||||
@@ -63,15 +63,19 @@ namespace
|
|||||||
CHAR_H = 7,
|
CHAR_H = 7,
|
||||||
CHAR_I = 8,
|
CHAR_I = 8,
|
||||||
CHAR_J = 9
|
CHAR_J = 9
|
||||||
} Char;
|
};
|
||||||
|
|
||||||
typedef struct { Char i; int mask; } Bar;
|
struct Bar
|
||||||
|
{
|
||||||
|
Char i;
|
||||||
|
int mask;
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct
|
struct BarMapEntry
|
||||||
{
|
{
|
||||||
Bar descender;
|
Bar descender;
|
||||||
Bar ascender;
|
Bar ascender;
|
||||||
} BarMapEntry;
|
};
|
||||||
|
|
||||||
const BarMapEntry barMap[] = {
|
const BarMapEntry barMap[] = {
|
||||||
/* 1 */ { { CHAR_H, 1<<2 }, { CHAR_E, 1<<3 } },
|
/* 1 */ { { CHAR_H, 1<<2 }, { CHAR_E, 1<<3 } },
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace
|
|||||||
/*
|
/*
|
||||||
* Parity selection
|
* Parity selection
|
||||||
*/
|
*/
|
||||||
typedef enum { P_ODD, P_EVEN } Parity;
|
enum Parity { P_ODD, P_EVEN };
|
||||||
|
|
||||||
const Parity parity[10][6] = {
|
const Parity parity[10][6] = {
|
||||||
/* Pos 1, Pos 2, Pos 3, Pos 4, Pos 5, Pos 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.
|
* Barcode creation function signature.
|
||||||
*/
|
*/
|
||||||
typedef Barcode* (*BarcodeCreateFct)();
|
using BarcodeCreateFct = Barcode* (*)();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -113,7 +113,7 @@ namespace glbarcode
|
|||||||
/**
|
/**
|
||||||
* Map barcode type strings to creation functions.
|
* Map barcode type strings to creation functions.
|
||||||
*/
|
*/
|
||||||
typedef std::map<std::string,BarcodeCreateFct> BarcodeTypeMap;
|
using BarcodeTypeMap = std::map<std::string,BarcodeCreateFct>;
|
||||||
static BarcodeTypeMap mBarcodeTypeMap;
|
static BarcodeTypeMap mBarcodeTypeMap;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user