@@ -37,44 +37,44 @@ namespace re2 {
37
37
// Constructors per Inst opcode
38
38
39
39
void Prog::Inst::InitAlt (uint32_t out, uint32_t out1) {
40
- ABSL_DCHECK_EQ (out_opcode_, 0 );
40
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
41
41
set_out_opcode (out, kInstAlt );
42
42
out1_ = out1;
43
43
}
44
44
45
45
void Prog::Inst::InitByteRange (int lo, int hi, int foldcase, uint32_t out) {
46
- ABSL_DCHECK_EQ (out_opcode_, 0 );
46
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
47
47
set_out_opcode (out, kInstByteRange );
48
48
lo_ = lo & 0xFF ;
49
49
hi_ = hi & 0xFF ;
50
50
hint_foldcase_ = foldcase&1 ;
51
51
}
52
52
53
53
void Prog::Inst::InitCapture (int cap, uint32_t out) {
54
- ABSL_DCHECK_EQ (out_opcode_, 0 );
54
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
55
55
set_out_opcode (out, kInstCapture );
56
56
cap_ = cap;
57
57
}
58
58
59
59
void Prog::Inst::InitEmptyWidth (EmptyOp empty, uint32_t out) {
60
- ABSL_DCHECK_EQ (out_opcode_, 0 );
60
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
61
61
set_out_opcode (out, kInstEmptyWidth );
62
62
empty_ = empty;
63
63
}
64
64
65
65
void Prog::Inst::InitMatch (int32_t id) {
66
- ABSL_DCHECK_EQ (out_opcode_, 0 );
66
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
67
67
set_opcode (kInstMatch );
68
68
match_id_ = id;
69
69
}
70
70
71
71
void Prog::Inst::InitNop (uint32_t out) {
72
- ABSL_DCHECK_EQ (out_opcode_, 0 );
72
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
73
73
set_opcode (kInstNop );
74
74
}
75
75
76
76
void Prog::Inst::InitFail () {
77
- ABSL_DCHECK_EQ (out_opcode_, 0 );
77
+ ABSL_DCHECK_EQ (out_opcode_, uint32_t { 0 } );
78
78
set_opcode (kInstFail );
79
79
}
80
80
@@ -1113,7 +1113,7 @@ const void* Prog::PrefixAccel_ShiftDFA(const void* data, size_t size) {
1113
1113
#if defined(__AVX2__)
1114
1114
// Finds the least significant non-zero bit in n.
1115
1115
static int FindLSBSet (uint32_t n) {
1116
- ABSL_DCHECK_NE (n, 0 );
1116
+ ABSL_DCHECK_NE (n, uint32_t { 0 } );
1117
1117
#if defined(__GNUC__)
1118
1118
return __builtin_ctz (n);
1119
1119
#elif defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
@@ -1135,7 +1135,7 @@ static int FindLSBSet(uint32_t n) {
1135
1135
#endif
1136
1136
1137
1137
const void * Prog::PrefixAccel_FrontAndBack (const void * data, size_t size) {
1138
- ABSL_DCHECK_GE (prefix_size_, 2 );
1138
+ ABSL_DCHECK_GE (prefix_size_, size_t { 2 } );
1139
1139
if (size < prefix_size_)
1140
1140
return NULL ;
1141
1141
// Don't bother searching the last prefix_size_-1 bytes for prefix_front_.
0 commit comments