Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/BLI_span.hh')
-rw-r--r--source/blender/blenlib/BLI_span.hh8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_span.hh b/source/blender/blenlib/BLI_span.hh
index 0f3fcea1270..adfccd8d6fe 100644
--- a/source/blender/blenlib/BLI_span.hh
+++ b/source/blender/blenlib/BLI_span.hh
@@ -112,13 +112,11 @@ template<typename T> class Span {
* Span<int> span = {1, 2, 3, 4};
* call_function_with_array(span);
*/
- constexpr Span(const std::initializer_list<T> &list)
- : Span(list.begin(), static_cast<int64_t>(list.size()))
+ constexpr Span(const std::initializer_list<T> &list) : Span(list.begin(), int64_t(list.size()))
{
}
- constexpr Span(const std::vector<T> &vector)
- : Span(vector.data(), static_cast<int64_t>(vector.size()))
+ constexpr Span(const std::vector<T> &vector) : Span(vector.data(), int64_t(vector.size()))
{
}
@@ -718,7 +716,7 @@ template<typename T> class MutableSpan {
{
BLI_assert((size_ * sizeof(T)) % sizeof(NewT) == 0);
int64_t new_size = size_ * sizeof(T) / sizeof(NewT);
- return MutableSpan<NewT>((NewT *)data_, new_size);
+ return MutableSpan<NewT>(reinterpret_cast<NewT *>(data_), new_size);
}
};