From e9b2a22da6a5a4cc49b410681bd5cf228f1e8fc3 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Fri, 20 Nov 2009 13:02:38 -0500 Subject: [PATCH] cleanup: explain -5 magic value used in map-sorting code --- runtime/map.c | 2 +- translate.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/map.c b/runtime/map.c index 74467f30f..20d8a48c7 100644 --- a/runtime/map.c +++ b/runtime/map.c @@ -412,7 +412,7 @@ static void _stp_pmap_del(PMAP pmap) } /* sort keynum values */ -#define SORT_COUNT -5 +#define SORT_COUNT -5 /* see also translate.cxx:visit_foreach_loop */ #define SORT_SUM -4 #define SORT_MIN -3 #define SORT_MAX -2 diff --git a/translate.cxx b/translate.cxx index ca2981138..03f7c86a1 100644 --- a/translate.cxx +++ b/translate.cxx @@ -2611,7 +2611,7 @@ c_unparser::visit_foreach_loop (foreach_loop *s) // @count instead for aggregates. '-5' tells the // runtime to sort by count. if (s->sort_column == 0) - sort_column = -5; + sort_column = -5; /* runtime/map.c SORT_COUNT */ else sort_column = s->sort_column; -- 2.43.5