[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 1a68606 23/33: Conserve 80-character maximum
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 1a68606 23/33: Conserve 80-character maximum width |
Date: |
Mon, 3 May 2021 08:15:54 -0400 (EDT) |
branch: master
commit 1a686063596430972076f0cd0fb2eb52d50aaac3
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Conserve 80-character maximum width
Particularly for source files that already conform to the ideal
eighty-character maximum width (excluding longer copyright notices),
strive not to widen any line beyond that ideal.
---
view_ex.cpp | 6 +++++-
wx_test_benchmark_census.cpp | 3 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/view_ex.cpp b/view_ex.cpp
index db32b53..e22c72b 100644
--- a/view_ex.cpp
+++ b/view_ex.cpp
@@ -208,5 +208,9 @@ std::string ViewEx::base_filename() const
{
std::string
t(GetDocument()->GetUserReadableName().ToStdString(wxConvUTF8));
fs::path path(t);
- return path.has_filename() ? path.filename().string() :
std::string("Hastur");
+// Allowed by
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0980r0.pdf
+// static constexpr std::string unnameable{"Hastur"};
+ static std::string const unnameable{"Hastur"};
+ return path.has_filename() ? path.filename().string() : unnameable;
}
diff --git a/wx_test_benchmark_census.cpp b/wx_test_benchmark_census.cpp
index a52d4fb..3408486 100644
--- a/wx_test_benchmark_census.cpp
+++ b/wx_test_benchmark_census.cpp
@@ -137,7 +137,8 @@ LMI_WX_TEST_CASE(benchmark_census)
{
for(auto const& i : fs::directory_iterator(get_test_files_path()))
{
-
if(!wxString::FromUTF8(i.path().filename().string()).Matches("MSEC*.cns"))
+ std::string const s {i.path().filename().string()};
+ if(!wxString::FromUTF8(s).Matches("MSEC*.cns"))
{
continue;
}
- [lmi-commits] [lmi] master f767cd4 17/33: Fix defect introduced 20190527T1635Z: erroneous documentation, (continued)
- [lmi-commits] [lmi] master f767cd4 17/33: Fix defect introduced 20190527T1635Z: erroneous documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 325e88a 12/33: Increase filename portability, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 271a1b8 09/33: Note a deferred boost-migration question, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 2025958 06/33: Names are stronger than comments, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master bb267b7 18/33: Reinstate some recently-removed documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 6d7a545 26/33: Reinsert a required empty line, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master ea4515f 04/33: Further deboostify, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 4faab10 01/33: Adjust whitespace for microconcinnity, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master f4f4756 05/33: Resolve a marked defect [283], Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master c98c00d 10/33: Say "basename" rather than "leaf", Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 1a68606 23/33: Conserve 80-character maximum width,
Greg Chicares <=
- [lmi-commits] [lmi] master e33e392 22/33: Correct and reformat the modify_directory() documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master fd44389 03/33: Include appropriate headers, and say why they're included, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master fdc0f5a 07/33: Deboostify even more, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 41274a8 14/33: Improve documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master e4d2f31 08/33: Rename a function, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 2038991 15/33: Improve concinnity, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 9235f33 16/33: Avoid implicit conversion to fs::path, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 4ab2c4e 20/33: Further improve modify_directory() documentation, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master b64436f 19/33: Improve modify_directory() documentation and tests, Greg Chicares, 2021/05/03
- [lmi-commits] [lmi] master 0e3d61a 21/33: Rework modify_directory() documentation; augment unit test, Greg Chicares, 2021/05/03