Revision: 76774
          http://sourceforge.net/p/brlcad/code/76774
Author:   brlcad
Date:     2020-08-15 04:35:07 +0000 (Sat, 15 Aug 2020)
Log Message:
-----------
note these tables should be kept sorted

Modified Paths:
--------------
    brlcad/trunk/src/libbu/units.c

Modified: brlcad/trunk/src/libbu/units.c
===================================================================
--- brlcad/trunk/src/libbu/units.c      2020-08-15 04:15:00 UTC (rev 76773)
+++ brlcad/trunk/src/libbu/units.c      2020-08-15 04:35:07 UTC (rev 76774)
@@ -43,6 +43,7 @@
 #include "bu/units.h"
 #include "bu/vls.h"
 
+
 struct cvt_tab {
     double val;
     char name[32];
@@ -52,6 +53,10 @@
     struct cvt_tab *cvttab;
 };
 
+
+/* Keep table sorted sorted small-to-large.  Algorithms below may rely
+ * on the ordering.
+ */
 static struct cvt_tab bu_units_length_tab[] = {
     {0.0,              "none"},
     {1.0e-21,          "ym"},
@@ -134,6 +139,9 @@
 };
 #define BU_UNITS_TABLE_SIZE (sizeof(bu_units_length_tab) / sizeof(struct 
cvt_tab) - 1)
 
+/* Keep table sorted sorted small-to-large.  Algorithms below may rely
+ * on the ordering.
+ */
 static struct cvt_tab bu_units_volume_tab[] = {
     {0.0,              "none"},
     {1.0,              "mm^3"},                /* default */
@@ -156,6 +164,9 @@
     {0.0,               ""}                     /* LAST ENTRY */
 };
 
+/* Keep table sorted sorted small-to-large.  Algorithms below may rely
+ * on the ordering.
+ */
 static struct cvt_tab bu_units_mass_tab[] = {
     {0.0,              "none"},
     {1.0,              "grams"},               /* default */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to