Skip to content

Commit

Permalink
Remove unused span helpers without verbs in their name.
Browse files Browse the repository at this point in the history
  • Loading branch information
levlam committed Jan 31, 2022
1 parent b1b945e commit aceb369
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions tdutils/td/utils/Span.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,46 +145,11 @@ using Span = detail::SpanImpl<T, const T>;
template <class T>
using MutableSpan = detail::SpanImpl<T, T>;

template <class T>
Span<T> span(const T *ptr, size_t size) {
return Span<T>(ptr, size);
}
template <class T>
Span<T> span(const vector<T> &vec) {
return Span<T>(vec);
}

template <class T>
MutableSpan<T> mutable_span(T *ptr, size_t size) {
return MutableSpan<T>(ptr, size);
}
template <class T>
MutableSpan<T> mutable_span(vector<T> &vec) {
return MutableSpan<T>(vec);
}

template <class T>
Span<T> span_one(const T &value) {
return Span<T>(&value, 1);
}
template <class T>
MutableSpan<T> mutable_span_one(T &value) {
return MutableSpan<T>(&value, 1);
}

template <class T>
Span<T> as_span(Span<T> span) {
return span;
}
template <class T>
Span<T> as_span(const std::vector<T> &vec) {
return Span<T>(vec);
}

template <class T>
MutableSpan<T> as_mutable_span(MutableSpan<T> span) {
return span;
}
template <class T>
MutableSpan<T> as_mutable_span(std::vector<T> &vec) {
return MutableSpan<T>(vec);
Expand Down

0 comments on commit aceb369

Please sign in to comment.