lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 5548922 14/16: Avoid gratuitous use of member


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5548922 14/16: Avoid gratuitous use of member size()
Date: Thu, 15 Nov 2018 17:37:05 -0500 (EST)

branch: master
commit 55489224f0b46609a18d0c58bbd0ec056f355987
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Avoid gratuitous use of member size()
---
 calendar_date_test.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/calendar_date_test.cpp b/calendar_date_test.cpp
index dda16ae..692be45 100644
--- a/calendar_date_test.cpp
+++ b/calendar_date_test.cpp
@@ -1077,7 +1077,7 @@ void CalendarDateTest::TestIo()
 // bodies of these speed-test functions. For now, writing to a quasi-
 // global volatile variable is intended to serve that function, though
 // it's difficult to be sure it's correctly used in each case, and
-// calling julian_day_number() or size() just to get a value to write
+// calling julian_day_number() or empty() just to get a value to write
 // to that volatile variable is an ugly artifice.
 
 namespace
@@ -1091,7 +1091,7 @@ void mete()
     calendar_date u(2525, 12, 31);
     t = u;
     ++t;
-    scupper = t.str().size();
+    scupper = t.str().empty();
     t = add_years_and_months(t, 1, 1, true);
     scupper = attained_age(u, t, oe_age_last_birthday);
     u = minimum_birthdate(45, t, oe_age_last_birthday);
@@ -1132,7 +1132,7 @@ void mete_get_y_m_d()
 void mete_format()
 {
     static const calendar_date t(7510, 12, 31);
-    scupper = t.str().size();
+    scupper = t.str().empty();
 }
 
 void mete_attained_age()



reply via email to

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