Files
test2/source/blender/blenlib/intern/generic_virtual_vector_array.cc
Sergey Sharybin c1bc70b711 Cleanup: Add a copyright notice to files and use SPDX format
A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.

This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.

Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.

Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:

    https://reuse.software/faq/
2023-05-31 16:19:06 +02:00

56 lines
1.6 KiB
C++

/* SPDX-FileCopyrightText: 2023 Blender Foundation
*
* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_generic_virtual_vector_array.hh"
namespace blender {
void GVArray_For_GVVectorArrayIndex::get(const int64_t index_in_vector, void *r_value) const
{
vector_array_.get_vector_element(index_, index_in_vector, r_value);
}
void GVArray_For_GVVectorArrayIndex::get_to_uninitialized(const int64_t index_in_vector,
void *r_value) const
{
type_->default_construct(r_value);
vector_array_.get_vector_element(index_, index_in_vector, r_value);
}
int64_t GVVectorArray_For_SingleGVArray::get_vector_size_impl(const int64_t /*index*/) const
{
return varray_.size();
}
void GVVectorArray_For_SingleGVArray::get_vector_element_impl(const int64_t /*index*/,
const int64_t index_in_vector,
void *r_value) const
{
varray_.get(index_in_vector, r_value);
}
bool GVVectorArray_For_SingleGVArray::is_single_vector_impl() const
{
return true;
}
int64_t GVVectorArray_For_SingleGSpan::get_vector_size_impl(const int64_t /*index*/) const
{
return span_.size();
}
void GVVectorArray_For_SingleGSpan::get_vector_element_impl(const int64_t /*index*/,
const int64_t index_in_vector,
void *r_value) const
{
type_->copy_assign(span_[index_in_vector], r_value);
}
bool GVVectorArray_For_SingleGSpan::is_single_vector_impl() const
{
return true;
}
} // namespace blender