/[svn]/linuxsampler/trunk/src/scriptvm/tree.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/tree.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2610 by schoenebeck, Thu Jun 5 00:16:25 2014 UTC revision 2611 by schoenebeck, Mon Jun 9 19:20:37 2014 UTC
# Line 713  bool Relation::isConstExpr() const { Line 713  bool Relation::isConstExpr() const {
713    
714  int Or::evalInt() {  int Or::evalInt() {
715      IntExpr* pLHS = dynamic_cast<IntExpr*>(&*lhs);      IntExpr* pLHS = dynamic_cast<IntExpr*>(&*lhs);
716        if (pLHS->evalInt()) return 1;
717      IntExpr* pRHS = dynamic_cast<IntExpr*>(&*rhs);;      IntExpr* pRHS = dynamic_cast<IntExpr*>(&*rhs);;
718      return pLHS->evalInt() || pRHS->evalInt();      return (pRHS->evalInt()) ? 1 : 0;
719  }  }
720    
721  void Or::dump(int level) {  void Or::dump(int level) {
# Line 730  void Or::dump(int level) { Line 731  void Or::dump(int level) {
731    
732  int And::evalInt() {  int And::evalInt() {
733      IntExpr* pLHS = dynamic_cast<IntExpr*>(&*lhs);      IntExpr* pLHS = dynamic_cast<IntExpr*>(&*lhs);
734      IntExpr* pRHS = dynamic_cast<IntExpr*>(&*rhs);;      if (!pLHS->evalInt()) return 0;
735      return pLHS->evalInt() && pRHS->evalInt();      IntExpr* pRHS = dynamic_cast<IntExpr*>(&*rhs);
736        return (pRHS->evalInt()) ? 1 : 0;
737  }  }
738    
739  void And::dump(int level) {  void And::dump(int level) {

Legend:
Removed from v.2610  
changed lines
  Added in v.2611

  ViewVC Help
Powered by ViewVC