[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e861045 3/3: Improve documentation
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e861045 3/3: Improve documentation |
Date: |
Wed, 12 Jun 2019 19:32:07 -0400 (EDT) |
branch: master
commit e86104519c44edd7e47251268d60d1e30b63d07f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Improve documentation
See:
https://lists.nongnu.org/archive/html/lmi/2019-06/msg00019.html
---
dbindex.hpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dbindex.hpp b/dbindex.hpp
index 3ad5d11..44ed828 100644
--- a/dbindex.hpp
+++ b/dbindex.hpp
@@ -65,6 +65,18 @@ enum enum_database_dimensions
/// Product-database lookup index.
///
/// Implicitly-declared special member functions do the right thing.
+///
+/// Members such as state(mcenum_state) depart from this idiom:
+/// https://isocpp.org/wiki/faq/ctors#named-parameter-idiom
+/// so that idx_ can be const. In practice, they're used only to
+/// create throwaway database_index objects, so modifying the current
+/// object was actually undesirable. Arguably they should have more
+/// verbose names.
+///
+/// Arguably enumerators should be used rather than literal integers
+/// in the implementation, e.g.,
+/// s/5/e_axis_state/
+/// but OTOH compactness increases readability.
class database_index
{