THRIFT-4513: fix bug in comparator introduced by e58f75d
This closes #1517
diff --git a/compiler/cpp/src/thrift/parse/t_const_value.h b/compiler/cpp/src/thrift/parse/t_const_value.h
index f4416e9..6a114cf 100644
--- a/compiler/cpp/src/thrift/parse/t_const_value.h
+++ b/compiler/cpp/src/thrift/parse/t_const_value.h
@@ -159,10 +159,10 @@
if (*(left.first) < *(right.first)) {
return true;
} else {
- if (right.first < left.first) {
- return *(left.second) < *(right.second);
- } else {
+ if (*(right.first) < *(left.first)) {
return false;
+ } else {
+ return *(left.second) < *(right.second);
}
}
}