Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool matches(char ca) {
- switch(T) {
- case Lit: return c == ca;
- case Opt: return (set & (1 << (ca - 'a'))) != 0;
- }
- }
- replacing THIS
- // if(!M[i].matches(word[i])) return false;
- manual inlining HERE
- Match &ma = M[i];
- switch(ma.T) {
- case Lit: if(ma.c != word[i]) return false;
- case Opt: if(!((ma.set & (1 << (word[i] - 'a'))) != 0)) return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment