summaryrefslogtreecommitdiff
path: root/source/person.cc
diff options
context:
space:
mode:
Diffstat (limited to 'source/person.cc')
-rw-r--r--source/person.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/person.cc b/source/person.cc
index e80e6df..542bfe7 100644
--- a/source/person.cc
+++ b/source/person.cc
@@ -5,14 +5,14 @@
#include <book_store/person.hh>
namespace book_store::consumer {
-auto person::last_name() const noexcept -> std::string_view {
- return this->_last_name;
-}
-
auto person::first_name() const noexcept -> std::string_view {
return this->_first_name;
}
+auto person::last_name() const noexcept -> std::string_view {
+ return this->_last_name;
+}
+
auto person::full_name(bool last_first) const noexcept -> std::string {
if (last_first) {
return this->_last_name + ", " + this->_first_name;
@@ -23,14 +23,14 @@ auto person::full_name(bool last_first) const noexcept -> std::string {
auto person::id() const noexcept -> std::size_t { return this->_id; }
-auto person::last_name(std::string_view last_name) noexcept -> person & {
- this->_last_name = last_name;
+auto person::first_name(std::string_view first_name) noexcept -> person & {
+ this->_first_name = first_name;
return *this;
}
-auto person::first_name(std::string_view first_name) noexcept -> person & {
- this->_first_name = first_name;
+auto person::last_name(std::string_view last_name) noexcept -> person & {
+ this->_last_name = last_name;
return *this;
}