lmi-commits
[Top][All Lists]
Advanced

[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);
         }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]