diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2023-03-01 19:06:26 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2023-03-04 10:10:21 +0100 |
commit | 32e35fc80784adbbfe6d35c001b1e6c36a599aaa (patch) | |
tree | 7e275856af15a0e6bce5d064deb3eadddaf929f8 /src/util/TextTable.cpp | |
parent | 5c700eac69f1e9751d86bedf36d9a842c3d7283f (diff) | |
download | ccache-32e35fc80784adbbfe6d35c001b1e6c36a599aaa.tar.gz |
enhance: Add util::TextTable::Cell::Cell(std::string_view)
Diffstat (limited to 'src/util/TextTable.cpp')
-rw-r--r-- | src/util/TextTable.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/util/TextTable.cpp b/src/util/TextTable.cpp index 53014aa4..c7fd17f2 100644 --- a/src/util/TextTable.cpp +++ b/src/util/TextTable.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2021 Joel Rosdahl and other contributors +// Copyright (C) 2021-2023 Joel Rosdahl and other contributors // // See doc/AUTHORS.adoc for a complete list of contributors. // @@ -115,9 +115,11 @@ TextTable::render() const return result; } -TextTable::Cell::Cell(const std::string& text) - : m_text(text), - m_right_align(false) +TextTable::Cell::Cell(const std::string& text) : m_text(text) +{ +} + +TextTable::Cell::Cell(std::string_view text) : Cell(std::string(text)) { } |