if (safe.size() > 0){
priority_queue<pair<double,SortAction>,vector<pair<double,SortAction> >, ScoreCmp > pq;
for (ActionList::iterator sa = safe.begin(); sa != safe.end(); ++sa){
- pq.push(pair<double,SortAction>(m.score(*sa),*sa));
+ pq.push(pair<double,SortAction>(m.score(*sa,temp),*sa));
}
SortAction sa = pq.top().second;
sa(temp);