Skip to content

Commit ffb510c

Browse files
committed
Remove get_string_view()
1 parent 993ce71 commit ffb510c

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

phlex/core/product_query.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ namespace phlex {
3030
bool product_query::match(experimental::product_specification const& spec) const
3131
{
3232
// string comparisons for now for a gradual transition
33-
if (creator.get_string_view() != spec.algorithm()) {
33+
if (std::string_view(creator) != spec.algorithm()) {
3434
return false;
3535
}
3636
if (type != spec.type()) {

phlex/core/product_query.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace phlex {
2424
{
2525
static_assert(false, "The creator name has not been set in this product_query.");
2626
}
27-
required_creator_name(T&& rhs) : content_(std::forward<T>(rhs))
27+
required_creator_name(T&& rhs) : content_(std::move(rhs))
2828
{
2929
if (content_.empty()) {
3030
throw std::runtime_error("Cannot specify product with empty creator name.");
@@ -33,9 +33,6 @@ namespace phlex {
3333

3434
operator T const&() const noexcept { return content_; }
3535

36-
// For the transition
37-
std::string_view get_string_view() const noexcept { return std::string_view(content_); }
38-
3936
private:
4037
experimental::identifier content_;
4138
};
@@ -58,9 +55,6 @@ namespace phlex {
5855

5956
operator T const&() const noexcept { return content_; }
6057

61-
// For the transition
62-
std::string_view get_string_view() const noexcept { return std::string_view(content_); }
63-
6458
private:
6559
experimental::identifier content_;
6660
};

0 commit comments

Comments
 (0)