Remove excessive constant declarations
When all .cc files are #included from a single master C++ file, repetitive constant definitions - although the constant value remains the same - makes MSVC error out. Besides, it is not a good practice to redefine same constant over and over again. It defies the main idea of constants: "define once, use many times".
This commit is contained in:
@@ -20,8 +20,6 @@
|
|||||||
#include "tote.h"
|
#include "tote.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
static const int kMinCJKUTF8CharBytes = 3;
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Offline: used by mapreduce or table construction
|
// Offline: used by mapreduce or table construction
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@@ -46,13 +46,6 @@ static const uint32 kWordMask0[4] = {
|
|||||||
0xFFFFFFFF, 0x000000FF, 0x0000FFFF, 0x00FFFFFF
|
0xFFFFFFFF, 0x000000FF, 0x0000FFFF, 0x00FFFFFF
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int kMinCJKUTF8CharBytes = 3;
|
|
||||||
|
|
||||||
static const int kMinGramCount = 3;
|
|
||||||
static const int kMaxGramCount = 16;
|
|
||||||
|
|
||||||
static const int UTFmax = 4; // Max number of bytes in a UTF-8 character
|
|
||||||
|
|
||||||
|
|
||||||
// Routines to access a hash table of <key:wordhash, value:probs> pairs
|
// Routines to access a hash table of <key:wordhash, value:probs> pairs
|
||||||
// Buckets have 4-byte wordhash for sizes < 32K buckets, but only
|
// Buckets have 4-byte wordhash for sizes < 32K buckets, but only
|
||||||
|
@@ -200,7 +200,6 @@ static const uint8 kTagParseTbl_0[] = {
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
UTFmax = 4, // maximum bytes per rune
|
|
||||||
Runesync = 0x80, // cannot represent part of a UTF sequence (<)
|
Runesync = 0x80, // cannot represent part of a UTF sequence (<)
|
||||||
Runeself = 0x80, // rune and UTF sequences are the same (<)
|
Runeself = 0x80, // rune and UTF sequences are the same (<)
|
||||||
Runeerror = 0xFFFD, // decoding error in UTF
|
Runeerror = 0xFFFD, // decoding error in UTF
|
||||||
|
Reference in New Issue
Block a user