mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Remove enum mqe_event and use u32 for queue events
We were using intermediate values int he enum and casting back and forth with a u32; it is cleaner to just use a u32 and define some special values. Silences ICC warning #188: enumerated type mixed with another type.
This commit is contained in:
committed by
Matthew Barr
parent
9ff1303cd8
commit
55b357f7d1
@@ -391,7 +391,7 @@ hwlmcb_rv_t roseHandleSuffixTrigger(const struct RoseEngine *t,
|
||||
}
|
||||
}
|
||||
|
||||
enum mqe_event top = tr->suffixEvent;
|
||||
u32 top = tr->suffixEvent;
|
||||
assert(top == MQE_TOP || (top >= MQE_TOP_FIRST && top < MQE_INVALID));
|
||||
pushQueueSom(q, top, loc, som);
|
||||
|
||||
@@ -977,14 +977,14 @@ void roseTriggerInfixes(const struct RoseEngine *t, const struct RoseRole *tr,
|
||||
do {
|
||||
u32 qi = curr_r->queue;
|
||||
u32 ri = queueToLeftIndex(t, qi);
|
||||
enum mqe_event topEvent = curr_r->event;
|
||||
u32 topEvent = curr_r->event;
|
||||
u8 cancel = curr_r->cancel_prev_top;
|
||||
assert(topEvent < MQE_INVALID);
|
||||
|
||||
const struct LeftNfaInfo *left = getLeftInfoByQueue(t, qi);
|
||||
assert(!left->transient);
|
||||
|
||||
DEBUG_PRINTF("rose %u (qi=%u) event %u\n", ri, qi, (u32)topEvent);
|
||||
DEBUG_PRINTF("rose %u (qi=%u) event %u\n", ri, qi, topEvent);
|
||||
|
||||
struct mq *q = tctxtToScratch(tctxt)->queues + qi;
|
||||
const struct NfaInfo *info = getNfaInfoByQueue(t, qi);
|
||||
|
@@ -2433,7 +2433,7 @@ vector<RoseTrigger> buildRoseTriggerList(const RoseGraph &g, RoseVertex u,
|
||||
assert(num_tops(g[v].left) == 1);
|
||||
top = MQE_TOP;
|
||||
} else {
|
||||
top = (enum mqe_event)((u32)MQE_TOP_FIRST + g[e].rose_top);
|
||||
top = MQE_TOP_FIRST + g[e].rose_top;
|
||||
assert(top < MQE_INVALID);
|
||||
}
|
||||
|
||||
|
@@ -236,7 +236,7 @@ struct LeftNfaInfo {
|
||||
// A list of these is used to trigger prefix/infix roses.
|
||||
struct RoseTrigger {
|
||||
u32 queue; // queue index of leftfix
|
||||
u32 event; // from enum mqe_event
|
||||
u32 event; // queue event, from MQE_*
|
||||
u8 cancel_prev_top;
|
||||
};
|
||||
|
||||
@@ -309,7 +309,7 @@ struct RoseRole {
|
||||
ReportID reportId; // report ID, or MO_INVALID_IDX
|
||||
u32 stateIndex; /**< index into state multibit, or MMB_INVALID. Roles do not
|
||||
* require a state bit if they are terminal */
|
||||
u32 suffixEvent; // from enum mqe_event
|
||||
u32 suffixEvent; // queue event, from MQE_
|
||||
u8 depth; /**< depth of this vertex from root in the tree, or 255 if greater.
|
||||
*/
|
||||
u32 suffixOffset; /**< suffix nfa: 0 if no suffix associated with the role,
|
||||
|
Reference in New Issue
Block a user