summaryrefslogtreecommitdiff
path: root/walk.h
diff options
context:
space:
mode:
Diffstat (limited to 'walk.h')
-rw-r--r--walk.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/walk.h b/walk.h
index 0e7d2e5e..238fdb78 100644
--- a/walk.h
+++ b/walk.h
@@ -40,9 +40,6 @@ struct item_handler {
template <typename T>
class compare_items {
- value_t left_result;
- value_t right_result;
-
const value_expr_t * sort_order;
public:
@@ -54,8 +51,12 @@ class compare_items {
bool operator()(const T * left, const T * right) {
assert(left);
assert(right);
+
+ value_t left_result;
sort_order->compute(left_result, details_t(left));
+ value_t right_result;
sort_order->compute(right_result, details_t(right));
+
return left_result < right_result;
}
};