From fd88b756fc20dedea15a8a08c21e8f7af6612e4e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 17 Jun 2021 10:02:30 -0400 Subject: Fix various spelling issues (#274). Signed-off-by: Josh Soref . --- src/misc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/misc.cpp') diff --git a/src/misc.cpp b/src/misc.cpp index f16216087..93ce13bd5 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -143,22 +143,22 @@ bool ListFormatter::IsEmpty() const void ListFormatter::Process(std::vector &buffer) { std::vector tcolumns; - std::map lenghts; + std::map lengths; std::set breaks; for (unsigned i = 0; i < this->columns.size(); ++i) { tcolumns.push_back(Language::Translate(this->nc, this->columns[i].c_str())); - lenghts[this->columns[i]] = tcolumns[i].length(); + lengths[this->columns[i]] = tcolumns[i].length(); } for (unsigned i = 0; i < this->entries.size(); ++i) { ListEntry &e = this->entries[i]; for (unsigned j = 0; j < this->columns.size(); ++j) - if (e[this->columns[j]].length() > lenghts[this->columns[j]]) - lenghts[this->columns[j]] = e[this->columns[j]].length(); + if (e[this->columns[j]].length() > lengths[this->columns[j]]) + lengths[this->columns[j]] = e[this->columns[j]].length(); } unsigned length = 0; - for (std::map::iterator it = lenghts.begin(), it_end = lenghts.end(); it != it_end; ++it) + for (std::map::iterator it = lengths.begin(), it_end = lengths.end(); it != it_end; ++it) { /* Break lines at 80 chars */ if (length > 80) @@ -185,7 +185,7 @@ void ListFormatter::Process(std::vector &buffer) s += " "; s += tcolumns[i]; if (i + 1 != this->columns.size()) - for (unsigned j = tcolumns[i].length(); j < lenghts[this->columns[i]]; ++j) + for (unsigned j = tcolumns[i].length(); j < lengths[this->columns[i]]; ++j) s += " "; } buffer.push_back(s); @@ -207,7 +207,7 @@ void ListFormatter::Process(std::vector &buffer) s += " "; s += e[this->columns[j]]; if (j + 1 != this->columns.size()) - for (unsigned k = e[this->columns[j]].length(); k < lenghts[this->columns[j]]; ++k) + for (unsigned k = e[this->columns[j]].length(); k < lengths[this->columns[j]]; ++k) s += " "; } buffer.push_back(s); -- cgit