raw_som_dfa: initialize members in constructor

This commit is contained in:
Alex Coyte
2015-11-02 13:35:04 +11:00
committed by Matthew Barr
parent 4311775b43
commit 89660e30b6
3 changed files with 11 additions and 9 deletions

View File

@@ -1109,7 +1109,7 @@ aligned_unique_ptr<NFA> goughCompile(raw_som_dfa &raw, u8 somPrecision,
u32 total_prog_size = byte_length(temp_blocks);
curr_offset += total_prog_size;
gi.stream_som_loc_count = slot_count;
gi.stream_som_loc_count = slot_count;
gi.stream_som_loc_width = somPrecision;
u32 gough_size = ROUNDUP_N(curr_offset, 16);

View File

@@ -70,8 +70,11 @@ struct dstate_som {
};
struct raw_som_dfa : public raw_dfa {
raw_som_dfa(nfa_kind k, bool unordered_som_triggers_in)
: raw_dfa(k), unordered_som_triggers(unordered_som_triggers_in) {
raw_som_dfa(nfa_kind k, bool unordered_som_triggers_in, u32 trigger,
u32 stream_som_loc_width_in)
: raw_dfa(k), stream_som_loc_width(stream_som_loc_width_in),
unordered_som_triggers(unordered_som_triggers_in),
trigger_nfa_state(trigger) {
assert(!unordered_som_triggers || is_triggered(kind));
}