lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 66ef509 4/7: Rename a function for terseness


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 66ef509 4/7: Rename a function for terseness
Date: Mon, 12 Feb 2018 07:15:10 -0500 (EST)

branch: master
commit 66ef5094e141dd6c91b10ea49e358a60a4bf45a6
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Rename a function for terseness
---
 ledger_pdf_generator_wx.cpp | 4 ++--
 miscellany.cpp              | 2 +-
 miscellany.hpp              | 2 +-
 miscellany_test.cpp         | 6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ledger_pdf_generator_wx.cpp b/ledger_pdf_generator_wx.cpp
index f9ac78e..8970c77 100644
--- a/ledger_pdf_generator_wx.cpp
+++ b/ledger_pdf_generator_wx.cpp
@@ -35,7 +35,7 @@
 #include "ledger_evaluator.hpp"
 #include "ledger_invariant.hpp"
 #include "ledger_variant.hpp"
-#include "miscellany.hpp"               // lmi_tolower(), 
get_needed_pages_count()
+#include "miscellany.hpp"               // lmi_tolower(), page_count()
 #include "pdf_writer_wx.hpp"
 #include "wx_table_generator.hpp"
 
@@ -1766,7 +1766,7 @@ class page_with_tabular_report
             }
 
         // We return the number of extra pages only, hence -1.
-        return get_needed_pages_count
+        return page_count
             (ledger.GetMaxLength()
             ,rows_per_page
             ,rows_per_group
diff --git a/miscellany.cpp b/miscellany.cpp
index 69bdc29..266b624 100644
--- a/miscellany.cpp
+++ b/miscellany.cpp
@@ -190,7 +190,7 @@ std::string iso_8601_datestamp_terse()
     return s;
 }
 
-int get_needed_pages_count
+int page_count
     (int total_rows
     ,int rows_per_page
     ,int rows_per_group
diff --git a/miscellany.hpp b/miscellany.hpp
index a057a8a..a42ac74 100644
--- a/miscellany.hpp
+++ b/miscellany.hpp
@@ -218,7 +218,7 @@ inline void stifle_warning_for_unused_value(T const& t)
 ///
 /// Preconditions: 0 < total_rows && 0 < rows_per_group <= rows_per_page
 
-int LMI_SO get_needed_pages_count
+int LMI_SO page_count
     (int total_rows
     ,int rows_per_page
     ,int rows_per_group
diff --git a/miscellany_test.cpp b/miscellany_test.cpp
index f5890ac..673277a 100644
--- a/miscellany_test.cpp
+++ b/miscellany_test.cpp
@@ -236,7 +236,7 @@ void test_trimming()
     BOOST_TEST_EQUAL(s, "a ; a");
 }
 
-void test_get_needed_pages_count()
+void test_page_count()
 {
     // Fix the number of rows per page and per group, we can reasonably suppose
     // that nothing critically depends on their precise values and all the
@@ -244,7 +244,7 @@ void test_get_needed_pages_count()
     // numbers of total rows.
     auto const do_test = [](int total_rows) -> int
         {
-        return get_needed_pages_count(total_rows, 28, 5);
+        return page_count(total_rows, 28, 5);
         };
 
     BOOST_TEST_EQUAL(do_test( 1), 1); // Edge case (0 rows is not allowed).
@@ -262,7 +262,7 @@ int test_main(int, char*[])
     test_minmax();
     test_prefix_and_suffix();
     test_trimming();
-    test_get_needed_pages_count();
+    test_page_count();
 
     return 0;
 }



reply via email to

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