[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 15b60953 7/8: Avoid reserved names and anythi
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 15b60953 7/8: Avoid reserved names and anything resembling them |
Date: |
Thu, 19 May 2022 13:29:02 -0400 (EDT) |
branch: master
commit 15b60953f2af193634edb35654c39cdf9b9f7e4f
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Avoid reserved names and anything resembling them
Some of these workarounds are silly, but harmless. Their silliness is
less offensive than undetected accidental use of a reserved name.
---
config.hpp | 2 +-
config_bc551.hpp | 2 +-
gpt_commutation_functions.hpp | 2 +-
ihs_acctval.cpp | 2 +-
math_functions.hpp | 2 +-
md5sum_test.cpp | 8 ++++----
path_utility_test.cpp | 2 +-
xml_serialize.hpp | 2 +-
8 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/config.hpp b/config.hpp
index 304edf64..dec1d737 100644
--- a/config.hpp
+++ b/config.hpp
@@ -189,7 +189,7 @@
// http://boost.cvs.sf.net/boost/boost/boost/config.hpp?annotate=1.1
// Many other "compilers define _MSC_VER. Thus BOOST_MSVC. [...]
// Must remain the last #elif since some other vendors (Metrowerks,
-// for example) also #define _MSC_VER"
+// for example) also #define _MSC_VER ..."
#if defined _MSC_VER && !defined LMI_GCC_VERSION && !defined
LMI_COMO_WITH_MINGW
# define LMI_MSC
diff --git a/config_bc551.hpp b/config_bc551.hpp
index 6bf06765..0e5262ac 100644
--- a/config_bc551.hpp
+++ b/config_bc551.hpp
@@ -42,7 +42,7 @@
#include <cstdio>
// COMPILER !! bc++5.5.1 Work around library bug: the 'stdin'
- // macro references '_streams' with no namespace qualifier,
+ // macro references _streams with no namespace qualifier,
// but including <cstdio> rather than <stdio.h> puts that
// referenced object in namespace std.
// See my post to borland.public.cppbuilder.language dated
diff --git a/gpt_commutation_functions.hpp b/gpt_commutation_functions.hpp
index 78eb37a0..5efe0197 100644
--- a/gpt_commutation_functions.hpp
+++ b/gpt_commutation_functions.hpp
@@ -180,7 +180,7 @@ class gpt_commfns
/// Specialized GPT commutation functions on the three required bases.
///
-/// '*_ig' (monthly effective death-benefit discount rate for NAAR) is
+/// 'ig' (monthly effective death-benefit discount rate for NAAR) is
/// distinct for GLP and GSP. Often it is the monthly equivalent of
/// four and six percent, respectively.
///
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index b9345aba..828c5306 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -1443,7 +1443,7 @@ void AccountValue::SetAnnualInvariants()
YearsTotLoadTgt = Loads_->target_total_load (GenBasis_)[Year];
YearsTotLoadExc = Loads_->excess_total_load (GenBasis_)[Year];
- // TAXATION !! This '_lowest_premium_tax' approach needs to be
+ // TAXATION !! This 'lowest_premium_tax' approach needs to be
// reworked: there should be an option (at least) to use the
// current tax rates.
YearsTotLoadTgtLowestPremtax =
Loads_->target_premium_load_minimum_premium_tax()[Year];
diff --git a/math_functions.hpp b/math_functions.hpp
index 31e8530f..19c3e5e8 100644
--- a/math_functions.hpp
+++ b/math_functions.hpp
@@ -29,7 +29,7 @@
#include <limits>
#include <numeric> // midpoint(), partial_sum()
#include <stdexcept>
-#include <type_traits> // /is_.*_v/
+#include <type_traits> // /is_.*/
#include <vector>
// TODO ?? Write functions here for other refactorable uses of
diff --git a/md5sum_test.cpp b/md5sum_test.cpp
index 959a7a47..ac36f210 100644
--- a/md5sum_test.cpp
+++ b/md5sum_test.cpp
@@ -188,9 +188,9 @@ void MD5SumTest::TestMD5Calculation() const
);
LMI_TEST_THROW
- (md5_calculate_file_checksum("_ghost_")
+ (md5_calculate_file_checksum("NoNeXiStEnT")
,std::runtime_error
- ,"'_ghost_': no such file or directory"
+ ,"'NoNeXiStEnT': no such file or directory"
);
}
@@ -243,9 +243,9 @@ void MD5SumTest::TestMD5Reading() const
LMI_TEST_EQUAL(md5sums, md5_read_checksum_file(md5sums_filename));
LMI_TEST_THROW
- (md5_read_checksum_file("_ghost_")
+ (md5_read_checksum_file("NoNeXiStEnT")
,std::runtime_error
- ,"'_ghost_': no such file or directory"
+ ,"'NoNeXiStEnT': no such file or directory"
);
}
diff --git a/path_utility_test.cpp b/path_utility_test.cpp
index dbfb6584..686bf508 100644
--- a/path_utility_test.cpp
+++ b/path_utility_test.cpp
@@ -148,7 +148,7 @@ void test_portable_filename()
);
LMI_TEST_EQUAL
- ( "_Fyodor_Dostoyevskiy_Crime_and_Punishment.text"
+ ( "_""Fyodor_Dostoyevskiy_Crime_and_Punishment.text"
,portable_filename("/Fyodor Dostoyevskiy/Crime and Punishment.text")
);
}
diff --git a/xml_serialize.hpp b/xml_serialize.hpp
index 9f6d111d..1dd03c48 100644
--- a/xml_serialize.hpp
+++ b/xml_serialize.hpp
@@ -257,7 +257,7 @@ void get_element(xml::element const& parent, std::string
const& name, T& t)
// Implementation note. These convenience wrappers are intended for
// use outside this header. With early forward declarations, they
-// could replace some occurrences of 'xml_io<...>::[to|from]_xml'
+// could replace some occurrences of 'xml_io<...>::[to|from]_*xml'
// above, but the benefit doesn't seem worth the loss of clarity.
/// Convenience wrapper for serialization to xml.
- [lmi-commits] [lmi] master updated (041ca2fb -> a28eba74), Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 3c412791 1/8: Allow certain reserved names, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 00d58837 3/8: Test forbiddance of some reserved names, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 1f4c7138 2/8: Allow 'test_coding_rules_test.sh' to contain reserved names, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 776827ee 4/8: Avoid typewriter-style citations, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 9c348d06 5/8: Avoid using _this_ style for emphasis, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 8ecde06f 6/8: Avoid reserved names in token pasting, Greg Chicares, 2022/05/19
- [lmi-commits] [lmi] master 15b60953 7/8: Avoid reserved names and anything resembling them,
Greg Chicares <=
- [lmi-commits] [lmi] master a28eba74 8/8: Forbid "_Forbidden" [273], Greg Chicares, 2022/05/19