diff --git a/ch14/ex14_18_StrBlob.cpp b/ch14/ex14_18_StrBlob.cpp index 2ea24ede..4b298ca8 100644 --- a/ch14/ex14_18_StrBlob.cpp +++ b/ch14/ex14_18_StrBlob.cpp @@ -9,32 +9,32 @@ bool operator==(const StrBlob &lhs, const StrBlob &rhs) { - return *lhs.data == *rhs.data; + return *lhs.data == *rhs.data; } bool operator!=(const StrBlob &lhs, const StrBlob &rhs) { - return !(lhs == rhs); + return !(lhs == rhs); } bool operator< (const StrBlob &lhs, const StrBlob &rhs) { - return std::lexicographical_compare(lhs.data->begin(), lhs.data->end(), rhs.data->begin(), rhs.data->end()); + return std::lexicographical_compare(lhs.data->begin(), lhs.data->end(), rhs.data->begin(), rhs.data->end()); } bool operator> (const StrBlob &lhs, const StrBlob &rhs) { - return rhs < lhs; + return rhs < lhs; } bool operator<=(const StrBlob &lhs, const StrBlob &rhs) { - return !(rhs < lhs); + return !(rhs < lhs); } bool operator>=(const StrBlob &lhs, const StrBlob &rhs) { - return !(lhs < rhs); + return !(lhs < rhs); } //================================================================ @@ -45,32 +45,32 @@ bool operator>=(const StrBlob &lhs, const StrBlob &rhs) bool operator==(const StrBlobPtr &lhs, const StrBlobPtr &rhs) { - return lhs.curr == rhs.curr; + return lhs.curr == rhs.curr; } bool operator!=(const StrBlobPtr &lhs, const StrBlobPtr &rhs) { - return !(lhs == rhs); + return !(lhs == rhs); } bool operator< (const StrBlobPtr &x, const StrBlobPtr &y) { - return x.curr < y.curr; + return x.curr < y.curr; } -bool operator> (const StrBlobPtr &x, const StrBlobPtr &y) +bool operator>(const StrBlobPtr &x, const StrBlobPtr &y) { - return x.curr > y.curr; + return x.curr > y.curr; } bool operator<=(const StrBlobPtr &x, const StrBlobPtr &y) { - return x.curr <= y.curr; + return x.curr <= y.curr; } bool operator>=(const StrBlobPtr &x, const StrBlobPtr &y) { - return x.curr >= y.curr; + return x.curr >= y.curr; } //================================================================ @@ -81,32 +81,32 @@ bool operator>=(const StrBlobPtr &x, const StrBlobPtr &y) bool operator==(const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) { - return lhs.curr == rhs.curr; + return lhs.curr == rhs.curr; } bool operator!=(const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) { - return !(lhs == rhs); + return !(lhs == rhs); } bool operator< (const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) { - return lhs.curr < rhs.curr; + return lhs.curr < rhs.curr; } -bool operator> (const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) +bool operator>(const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) { - return lhs.curr > rhs.curr; + return lhs.curr > rhs.curr; } bool operator<=(const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) { - return lhs.curr <= rhs.curr; + return lhs.curr <= rhs.curr; } bool operator>=(const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) { - return lhs.curr >= rhs.curr; + return lhs.curr >= rhs.curr; } //================================================================== @@ -117,18 +117,18 @@ bool operator>=(const ConstStrBlobPtr &lhs, const ConstStrBlobPtr &rhs) StrBlob& StrBlob::operator=(const StrBlob &lhs) { - data = make_shared>(*lhs.data); - return *this; + data = make_shared>(*lhs.data); + return *this; } StrBlob& StrBlob::operator=(StrBlob &&rhs) NOEXCEPT { - if (this != &rhs) { - data = std::move(rhs.data); - rhs.data = nullptr; - } + if (this != &rhs) { + data = std::move(rhs.data); + rhs.data = nullptr; + } - return *this; + return *this; } //================================================================== @@ -139,12 +139,12 @@ StrBlob& StrBlob::operator=(StrBlob &&rhs) NOEXCEPT StrBlobPtr StrBlob::begin() { - return StrBlobPtr(*this); + return StrBlobPtr(*this); } StrBlobPtr StrBlob::end() { - return StrBlobPtr(*this, data->size()); + return StrBlobPtr(*this, data->size()); } ConstStrBlobPtr StrBlob::cbegin() const