00001 /* cheapPtype.h 00002 */ 00003 #ifndef _CHEAPPTYPE_H 00004 #define _CHEAPPTYPE_H 00005 00006 #include "osl/move_order/promotion.h" 00007 #include "osl/eval/pieceEval.h" 00008 00009 namespace osl 00010 { 00011 namespace move_order 00012 { 00016 struct CheapPtype 00017 { 00018 bool operator()(Move l, Move r) const 00019 { 00020 const Ptype old_ptype_l = l.oldPtype(); 00021 const Ptype old_ptype_r = r.oldPtype(); 00022 00023 if (old_ptype_l != old_ptype_r) 00024 return (eval::Ptype_Eval_Table.value(old_ptype_l) 00025 < eval::Ptype_Eval_Table.value(old_ptype_r)); 00026 return Promotion()(l, r); 00027 } 00028 }; 00029 } // namespace move_order 00030 } // namespace osl 00031 00032 #endif /* _CHEAPPTYPE_H */ 00033 // ;;; Local Variables: 00034 // ;;; mode:c++ 00035 // ;;; c-basic-offset:2 00036 // ;;; End: