[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b88285e 1/2: Improve concinnity
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b88285e 1/2: Improve concinnity |
Date: |
Mon, 3 May 2021 15:33:48 -0400 (EDT) |
branch: master
commit b88285e0bbdf1c984b175e8f94d0ae245dfe2fa0
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Improve concinnity
Arranged the is_directory() and extension() tests in that order, for
uniformity:
git grep 'if.*is_directory' |grep extension
---
ce_product_name.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ce_product_name.cpp b/ce_product_name.cpp
index 2cea0da..ea81f6e 100644
--- a/ce_product_name.cpp
+++ b/ce_product_name.cpp
@@ -44,7 +44,7 @@ std::vector<std::string> fetch_product_names()
std::vector<std::string> names;
for(auto const& i : fs::directory_iterator(path))
{
- if(".policy" != i.path().extension() || i.is_directory())
+ if(i.is_directory() || ".policy" != i.path().extension())
{
continue;
}