Skip to content

Commit 26a9070

Browse files
committed
Adjust some whitespace in 'if' and 'for' statements
1 parent 7b7beaf commit 26a9070

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/lists.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,14 @@ auto operator<<( std::ostream & out, discover_new_issues const & x) -> std::ostr
564564
std::map<std::string, std::vector<int>, status_order> added_issues;
565565
for (auto const & i : new_issues) {
566566
auto j = std::lower_bound(old_issues.cbegin(), old_issues.cend(), std::get<0>(i), find_num{});
567-
if(j == old_issues.end() or std::get<0>(*j) != std::get<0>(i)) {
567+
if (j == old_issues.end() or std::get<0>(*j) != std::get<0>(i)) {
568568
added_issues[std::get<1>(i)].push_back(std::get<0>(i));
569569
}
570570
}
571571

572572
for (auto const & i : added_issues) {
573573
auto const item_count = std::get<1>(i).size();
574-
if(1 == item_count) {
574+
if (1 == item_count) {
575575
out << "<li>Added the following " << std::get<0>(i) << " issue: <iref ref=\"" << std::get<1>(i).front() << "\"/>.</li>\n";
576576
}
577577
else {
@@ -618,7 +618,7 @@ auto operator << (std::ostream & out, discover_changed_issues x) -> std::ostream
618618

619619
for (auto const & i : changed_issues) {
620620
auto const item_count = std::get<1>(i).size();
621-
if(1 == item_count) {
621+
if (1 == item_count) {
622622
out << "<li>Changed the following issue to " << std::get<1>(std::get<0>(i))
623623
<< " (from " << std::get<0>(std::get<0>(i)) << "): <iref ref=\"" << std::get<1>(i).front() << "\"/>.</li>\n";
624624
}

src/report_generator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ void print_issue(std::ostream & out, lwg::issue const & iss, lwg::section_map &
324324

325325
// When printing for the list, also emit an absolute link to the individual file.
326326
// Absolute link so that copying only the big lists elsewhere doesn't result in broken links.
327-
if(type == print_issue_type::in_list) {
327+
if (type == print_issue_type::in_list) {
328328
out << "<h3 id=\"" << iss.num << "\"><a href=\"#" << iss.num << "\">" << iss.num << "</a>";
329329
out << "<sup><a href=\"https://cplusplus.github.io/LWG/issue" << iss.num << "\">(i)</a></sup>";
330330
}
@@ -782,7 +782,7 @@ void report_generator::make_sort_by_section(std::span<issue> issues, fs::path co
782782
};
783783
std::ranges::sort(issues, {}, proj);
784784

785-
if(active_only) {
785+
if (active_only) {
786786
auto status_priority = [](const issue& i) { return lwg::get_status_priority(i.stat); };
787787
// Find the first issue not in Voting, Immediate, or Ready status:
788788
auto first = std::ranges::upper_bound(issues, lwg::get_status_priority("Ready"), {}, status_priority);
@@ -811,7 +811,7 @@ void report_generator::make_sort_by_section(std::span<issue> issues, fs::path co
811811
out << "<h1>Index by Section</h1>\n";
812812
out << "<p>Reference " << is14882_docno << "</p>\n";
813813
out << "<p>This document is the Index by Section for the <a href=\"lwg-active.html\">Library Active Issues List</a>";
814-
if(!active_only) {
814+
if (!active_only) {
815815
out << ", <a href=\"lwg-defects.html\">Library Defect Reports and Accepted Issues</a>, and <a href=\"lwg-closed.html\">Library Closed Issues List</a>";
816816
}
817817
out << ".</p>\n";

src/section_data.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ replace_all(std::string s, const std::string& old, const std::string& nw)
107107
int main (int argc, char** argv)
108108
{
109109
std::string prefix;
110-
if(argc > 1)
110+
if (argc > 1)
111111
prefix = std::string(argv[1]);
112112

113113
std::vector<std::pair<section_num, section_tag>> v;
@@ -121,7 +121,7 @@ int main (int argc, char** argv)
121121
std::cin >> n;
122122
if (std::cin.fail())
123123
throw std::runtime_error("incomplete tag / num pair");
124-
if(!prefix.empty())
124+
if (!prefix.empty())
125125
n.prefix = prefix;
126126

127127
t = replace_all(t, "&", "&amp;");

src/set_status.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ int main(int argc, char const * argv[]) {
109109
auto old_status = issue_data.substr(k, l-k);
110110
issue_data.replace(k, l-k, new_status);
111111

112-
if(lwg::filename_for_status(new_status) != lwg::filename_for_status(old_status)) {
112+
if (lwg::filename_for_status(new_status) != lwg::filename_for_status(old_status)) {
113113
// when performing a major status change, record the date and change as a note
114114
auto eod = issue_data.find("</discussion>");
115-
if(eod == std::string::npos) {
115+
if (eod == std::string::npos) {
116116
throw bad_issue_file{filename, "Unable to find end of discussion"};
117117
}
118118
std::ostringstream note;

src/status.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ constexpr std::string_view LWG_DEFECTS{"lwg-defects.html"};
1818

1919
auto lwg::filename_for_status(std::string_view stat) -> std::string_view {
2020
// Tentative issues are always active
21-
if(is_tentative(stat)) {
21+
if (is_tentative(stat)) {
2222
return LWG_ACTIVE;
2323
}
2424

@@ -78,21 +78,21 @@ auto lwg::is_tentative(std::string_view stat) -> bool {
7878
}
7979

8080
auto lwg::is_assigned_to_another_group(std::string_view stat) -> bool {
81-
for( auto s : {"Core", "EWG", "LEWG", "SG1", "SG9", "SG16" }) {
82-
if(s == stat) return true;
81+
for (auto s : {"Core", "EWG", "LEWG", "SG1", "SG9", "SG16" }) {
82+
if (s == stat) return true;
8383
}
8484
return false;
8585
}
8686

8787
auto lwg::is_not_resolved(std::string_view stat) -> bool {
8888
if (is_assigned_to_another_group(stat)) return true;
89-
for( auto s : {"Deferred", "New", "Open", "Review"}) { if(s == stat) return true; }
89+
for (auto s : {"Deferred", "New", "Open", "Review"}) { if (s == stat) return true; }
9090
return false;
9191
}
9292

9393
auto lwg::is_votable(std::string_view stat) -> bool {
9494
stat = remove_tentatively(stat);
95-
for( auto s : {"Immediate", "Voting"}) { if(s == stat) return true; }
95+
for (auto s : {"Immediate", "Voting"}) { if (s == stat) return true; }
9696
return false;
9797
}
9898

@@ -173,7 +173,7 @@ auto lwg::get_status_priority(std::string_view stat) noexcept -> std::ptrdiff_t
173173
auto const i = std::ranges::find(status_priority, stat);
174174
#if !defined(DEBUG_SUPPORT)
175175
// Diagnose when unknown status strings are passed
176-
if(std::end(status_priority) == i) {
176+
if (std::end(status_priority) == i) {
177177
std::cout << "Unknown status: " << stat << std::endl;
178178
}
179179
#endif

0 commit comments

Comments
 (0)