lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 255f547 1/3: Remove a superfluous assertion


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 255f547 1/3: Remove a superfluous assertion
Date: Mon, 3 May 2021 16:51:23 -0400 (EDT)

branch: master
commit 255f547c4189ce6d382d3c23016268a750fc25d1
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Remove a superfluous assertion
    
    A filesystem path must be nonempty if it has a nonempty basename.
    I.e., 'has_filename()' implies '!empty()'.
---
 path_utility.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/path_utility.cpp b/path_utility.cpp
index 97df7ca..554ab69 100644
--- a/path_utility.cpp
+++ b/path_utility.cpp
@@ -213,8 +213,7 @@ std::string serial_extension
 /// output filenames simpler and more regular, yet doesn't suppress
 /// any information that would actually be useful.
 ///
-/// Preconditions: census input filepath is nonempty and has a
-/// nonempty basename.
+/// Precondition: census input filepath has a nonempty basename.
 ///
 /// Any extension or path is discarded from the input census filepath;
 /// only the basename is used.
@@ -230,7 +229,6 @@ fs::path serial_file_path
     ,std::string const& extension
     )
 {
-    LMI_ASSERT(!exemplar.empty());
     LMI_ASSERT(exemplar.has_filename());
     fs::path f(portable_filename(exemplar.filename().string()));
     std::string s(serial_extension(serial_number, extension));



reply via email to

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