mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-11-23 15:30:36 +00:00
Avoid bugprone-move-forwarding-reference warning in Clang (#4560)
Use std::forward<T> instead of std::move, on an argument with rvalue-reference of template-deduced type. See https://clang.llvm.org/extra/clang-tidy/checks/bugprone-move-forwarding-reference.html Bug: crbug.com/1134310
This commit is contained in:
parent
0c4deebc96
commit
b46995741b
@ -142,7 +142,7 @@ inline IteratorRange<IteratorType> make_range(const IteratorType& begin,
|
||||
template <typename IteratorType>
|
||||
inline IteratorRange<IteratorType> make_range(IteratorType&& begin,
|
||||
IteratorType&& end) {
|
||||
return {std::move(begin), std::move(end)};
|
||||
return {std::forward<IteratorType>(begin), std::forward<IteratorType>(end)};
|
||||
}
|
||||
|
||||
// Returns a (begin, end) iterator pair for the given container.
|
||||
|
Loading…
Reference in New Issue
Block a user