[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2ba9033 11/12: Improve a variable's name
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2ba9033 11/12: Improve a variable's name |
Date: |
Sat, 24 Oct 2020 16:51:36 -0400 (EDT) |
branch: master
commit 2ba9033f9d311310a0987fdb0db5b58d5232a2c3
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve a variable's name
When a three-element container is [de]serialized twenty times, the
number of elements is three, and twenty is the number of iterations.
---
xml_serialize_test.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/xml_serialize_test.cpp b/xml_serialize_test.cpp
index cb66919..9144a61 100644
--- a/xml_serialize_test.cpp
+++ b/xml_serialize_test.cpp
@@ -40,7 +40,7 @@ std::string dom_string;
// Repetition count for /mete.*/ functions, tuned for speed and accuracy.
-int const number_of_elements = 20;
+int const number_of_iterations = 20;
using omap = std:: map<std::string, float>;
using umap = std::unordered_map<int , float>;
@@ -137,7 +137,7 @@ void mete_write(char const* name, T const& data)
{
xml_lmi::xml_document document("eraseme");
xml::element& root = document.root_node();
- for(int j = 0; j < number_of_elements; ++j)
+ for(int j = 0; j < number_of_iterations; ++j)
{
root.erase(name);
xml_serialize::set_element(root, name, data);
@@ -150,7 +150,7 @@ void mete_read(char const* name, T& data)
{
xml_lmi::dom_parser parser(dom_string.c_str(), dom_string.size());
xml::element const& root = parser.root_node("eraseme");
- for(int j = 0; j < number_of_elements; ++j)
+ for(int j = 0; j < number_of_iterations; ++j)
{
xml_serialize::get_element(root, name, data);
}
- [lmi-commits] [lmi] master 65f92f3 06/12: Refactor, (continued)
- [lmi-commits] [lmi] master 65f92f3 06/12: Refactor, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master 75399fe 01/12: Improve documentation, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master be4c0fd 05/12: Rename 'mete_*' functions for concinnity, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master d71f9e8 02/12: Improve parameter names, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master 9671a72 03/12: Rearrange for concinnity, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master 195d544 07/12: Improve explanation of certain unit tests, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master fdb2a62 04/12: Clarify unit-test output, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master 75cf29b 08/12: Rename local variables, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master fb65723 09/12: Serialize pairs to and from xml, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master d385546 10/12: Serialize associative-pair containers to and from xml, Greg Chicares, 2020/10/24
- [lmi-commits] [lmi] master 2ba9033 11/12: Improve a variable's name,
Greg Chicares <=
- [lmi-commits] [lmi] master 4427d76 12/12: C++17-ize, Greg Chicares, 2020/10/24