Guest User

Untitled

a guest
Apr 28th, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1.   bool matches(char ca) {
  2.     switch(T) {
  3.     case Lit: return c == ca;
  4.     case Opt: return (set & (1 << (ca - 'a'))) != 0;
  5.     }
  6.   }
  7.  
  8.  
  9.  
  10. replacing THIS
  11.   //  if(!M[i].matches(word[i])) return false;
  12.  
  13. manual inlining HERE
  14.  
  15.     Match &ma = M[i];
  16.     switch(ma.T) {
  17.     case Lit: if(ma.c != word[i]) return false;
  18.     case Opt: if(!((ma.set & (1 << (word[i] - 'a'))) != 0)) return false;
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment