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:
authorJacques Lucke <mail@jlucke.com>2019-11-07 15:48:30 +0300
committerJacques Lucke <mail@jlucke.com>2019-11-07 15:48:30 +0300
commit9116016f93fbc6fd61bcecf2336fd6197f6a4633 (patch)
treea6feffcdb0ee33428fc672624036e96c31826cf6
parentbef3e0022cdf27cb82455bb26a53f17fe65e9f3a (diff)
rename GET_TYPE to CPP_TYPE
-rw-r--r--source/blender/functions/FN_attributes_ref.h16
-rw-r--r--source/blender/functions/FN_cpp_type.h2
-rw-r--r--source/blender/functions/FN_generic_array_ref.h6
-rw-r--r--source/blender/functions/FN_generic_tuple.h4
-rw-r--r--source/blender/functions/FN_generic_vector_array.h4
-rw-r--r--source/blender/functions/FN_generic_virtual_list_list_ref.h2
-rw-r--r--source/blender/functions/FN_generic_virtual_list_ref.h4
-rw-r--r--source/blender/functions/FN_multi_function.h14
-rw-r--r--source/blender/functions/FN_multi_function_data_type.h4
-rw-r--r--source/blender/functions/intern/cpp_types.cc2
-rw-r--r--source/blender/functions/intern/multi_functions/lists.h6
-rw-r--r--source/blender/functions/intern/multi_functions/mixed.h4
-rw-r--r--source/blender/functions/intern/vtree_multi_function_network/mappings_sockets.cc8
-rw-r--r--source/blender/modifiers/intern/MOD_functionpoints_cxx.cc2
-rw-r--r--source/blender/simulations/bparticles/c_wrapper.cpp6
15 files changed, 42 insertions, 42 deletions
diff --git a/source/blender/functions/FN_attributes_ref.h b/source/blender/functions/FN_attributes_ref.h
index 753c5936d19..4a3530badd2 100644
--- a/source/blender/functions/FN_attributes_ref.h
+++ b/source/blender/functions/FN_attributes_ref.h
@@ -35,7 +35,7 @@ class AttributesInfoBuilder {
template<typename T> void add(StringRef name)
{
- this->add(name, GET_TYPE<T>());
+ this->add(name, CPP_TYPE<T>());
}
void add(StringRef name, const CPPType &type)
@@ -108,7 +108,7 @@ class AttributesInfo {
template<typename T> int index_of_try(StringRef name) const
{
- return this->index_of_try(name, GET_TYPE<T>());
+ return this->index_of_try(name, CPP_TYPE<T>());
}
int index_of_try(StringRef name) const
@@ -178,7 +178,7 @@ class AttributesRef {
template<typename T> MutableArrayRef<T> get(uint index) const
{
- BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+ BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
return MutableArrayRef<T>((T *)m_buffers[index] + m_range.start(), m_range.size());
}
@@ -233,7 +233,7 @@ class AttributesRefGroup {
template<typename T> void set(uint index, ArrayRef<T> data)
{
BLI_assert(data.size() == m_total_size);
- BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+ BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
uint offset = 0;
for (AttributesRef attributes : *this) {
@@ -256,7 +256,7 @@ class AttributesRefGroup {
template<typename T> void set_repeated(uint index, ArrayRef<T> data)
{
BLI_assert(m_total_size == 0 || data.size() > 0);
- BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+ BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
uint src_index = 0;
for (AttributesRef attributes : *this) {
@@ -279,7 +279,7 @@ class AttributesRefGroup {
template<typename T> void fill(uint index, const T &value)
{
- BLI_assert(m_info->type_of(index) == GET_TYPE<T>());
+ BLI_assert(m_info->type_of(index) == CPP_TYPE<T>());
for (AttributesRef attributes : *this) {
MutableArrayRef<T> array = attributes.get<T>(index);
@@ -349,7 +349,7 @@ class AttributesDefaults : BLI::NonCopyable, BLI::NonMovable {
else {
uint index = m_type_by_index.size();
m_index_by_name.add_new(name, index);
- const CPPType &type = GET_TYPE<T>();
+ const CPPType &type = CPP_TYPE<T>();
m_type_by_index.append(&type);
void *value_buffer = m_allocator.allocate(type.size(), type.alignment());
new (value_buffer) T(std::move(value));
@@ -367,7 +367,7 @@ class AttributesDefaults : BLI::NonCopyable, BLI::NonMovable {
template<typename T> const T &get(StringRef name) const
{
- const void *value = this->get(name, GET_TYPE<T>());
+ const void *value = this->get(name, CPP_TYPE<T>());
return *(const T *)value;
}
};
diff --git a/source/blender/functions/FN_cpp_type.h b/source/blender/functions/FN_cpp_type.h
index 766b7c118dd..0be74e4b316 100644
--- a/source/blender/functions/FN_cpp_type.h
+++ b/source/blender/functions/FN_cpp_type.h
@@ -186,7 +186,7 @@ class CPPType {
std::string m_name;
};
-template<typename T> const CPPType &GET_TYPE();
+template<typename T> const CPPType &CPP_TYPE();
} // namespace FN
diff --git a/source/blender/functions/FN_generic_array_ref.h b/source/blender/functions/FN_generic_array_ref.h
index e6d688c97a6..4bf9d417e71 100644
--- a/source/blender/functions/FN_generic_array_ref.h
+++ b/source/blender/functions/FN_generic_array_ref.h
@@ -51,7 +51,7 @@ class GenericArrayRef {
template<typename T> ArrayRef<T> as_typed_ref() const
{
- BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+ BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
return ArrayRef<T>((const T *)m_buffer, m_size);
}
};
@@ -76,7 +76,7 @@ class GenericMutableArrayRef {
template<typename T>
GenericMutableArrayRef(ArrayRef<T> array)
- : GenericMutableArrayRef(GET_TYPE<T>(), (void *)array.begin(), array.size())
+ : GenericMutableArrayRef(CPP_TYPE<T>(), (void *)array.begin(), array.size())
{
}
@@ -150,7 +150,7 @@ class GenericMutableArrayRef {
template<typename T> MutableArrayRef<T> as_typed_ref()
{
- BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+ BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
return MutableArrayRef<T>((T *)m_buffer, m_size);
}
};
diff --git a/source/blender/functions/FN_generic_tuple.h b/source/blender/functions/FN_generic_tuple.h
index 0dc473d7e84..9a8be9f1af3 100644
--- a/source/blender/functions/FN_generic_tuple.h
+++ b/source/blender/functions/FN_generic_tuple.h
@@ -84,7 +84,7 @@ class GenericTupleInfo : BLI::NonCopyable, BLI::NonMovable {
template<typename T> bool element_has_type(uint index) const
{
- return GET_TYPE<T>().is_same_or_generalization(*m_types[index]);
+ return CPP_TYPE<T>().is_same_or_generalization(*m_types[index]);
}
};
@@ -259,7 +259,7 @@ class GenericTupleRef {
return this->copy_out<T>(index);
}
- template<typename T> T GET_TYPE(uint index) const
+ template<typename T> T CPP_TYPE(uint index) const
{
BLI_STATIC_ASSERT(std::is_trivial<T>::value, "can only be used with trivial types");
return this->copy_out<T>(index);
diff --git a/source/blender/functions/FN_generic_vector_array.h b/source/blender/functions/FN_generic_vector_array.h
index c1f43dbdd91..62e5ca2015c 100644
--- a/source/blender/functions/FN_generic_vector_array.h
+++ b/source/blender/functions/FN_generic_vector_array.h
@@ -162,13 +162,13 @@ class GenericVectorArray : BLI::NonCopyable, BLI::NonMovable {
template<typename T> const TypedRef<T> as_typed_ref() const
{
- BLI_assert(GET_TYPE<T>().is_same_or_generalization(m_type));
+ BLI_assert(CPP_TYPE<T>().is_same_or_generalization(m_type));
return TypedRef<T>(*this);
}
template<typename T> MutableTypedRef<T> as_mutable_typed_ref()
{
- BLI_assert(GET_TYPE<T>().is_same_or_generalization(m_type));
+ BLI_assert(CPP_TYPE<T>().is_same_or_generalization(m_type));
return MutableTypedRef<T>(*this);
}
diff --git a/source/blender/functions/FN_generic_virtual_list_list_ref.h b/source/blender/functions/FN_generic_virtual_list_list_ref.h
index 9cd90df4cb8..54d01bb3fdb 100644
--- a/source/blender/functions/FN_generic_virtual_list_list_ref.h
+++ b/source/blender/functions/FN_generic_virtual_list_list_ref.h
@@ -97,7 +97,7 @@ class GenericVirtualListListRef {
template<typename T> VirtualListListRef<T> as_typed_ref() const
{
- BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+ BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
switch (m_category) {
case Category::SingleArray:
diff --git a/source/blender/functions/FN_generic_virtual_list_ref.h b/source/blender/functions/FN_generic_virtual_list_ref.h
index 4a82cee716c..f8543c0a04f 100644
--- a/source/blender/functions/FN_generic_virtual_list_ref.h
+++ b/source/blender/functions/FN_generic_virtual_list_ref.h
@@ -89,7 +89,7 @@ class GenericVirtualListRef {
template<typename T> static GenericVirtualListRef FromFullArray(ArrayRef<T> array)
{
return GenericVirtualListRef::FromFullArray(
- GET_TYPE<T>(), (const void *)array.begin(), array.size());
+ CPP_TYPE<T>(), (const void *)array.begin(), array.size());
}
static GenericVirtualListRef FromFullPointerArray(const CPPType &type,
@@ -150,7 +150,7 @@ class GenericVirtualListRef {
template<typename T> VirtualListRef<T> as_typed_ref() const
{
- BLI_assert(GET_TYPE<T>().is_same_or_generalization(*m_type));
+ BLI_assert(CPP_TYPE<T>().is_same_or_generalization(*m_type));
switch (m_category) {
case Category::Single:
diff --git a/source/blender/functions/FN_multi_function.h b/source/blender/functions/FN_multi_function.h
index 529be545379..49906173da2 100644
--- a/source/blender/functions/FN_multi_function.h
+++ b/source/blender/functions/FN_multi_function.h
@@ -122,13 +122,13 @@ class MFSignature {
return false;
}
else if (ELEM(category, MFParamType::ReadonlySingleInput, MFParamType::SingleOutput)) {
- return GET_TYPE<T>().is_same_or_generalization(m_param_types[index].type());
+ return CPP_TYPE<T>().is_same_or_generalization(m_param_types[index].type());
}
else if (ELEM(category,
MFParamType::ReadonlyVectorInput,
MFParamType::VectorOutput,
MFParamType::MutableVector)) {
- return GET_TYPE<T>().is_same_or_generalization(m_param_types[index].base_type());
+ return CPP_TYPE<T>().is_same_or_generalization(m_param_types[index].base_type());
}
else {
return false;
@@ -154,7 +154,7 @@ class MFSignatureBuilder {
template<typename T> void readonly_single_input(StringRef name)
{
- this->readonly_single_input(name, GET_TYPE<T>());
+ this->readonly_single_input(name, CPP_TYPE<T>());
}
void readonly_single_input(StringRef name, const CPPType &type)
{
@@ -164,7 +164,7 @@ class MFSignatureBuilder {
template<typename T> void single_output(StringRef name)
{
- this->single_output(name, GET_TYPE<T>());
+ this->single_output(name, CPP_TYPE<T>());
}
void single_output(StringRef name, const CPPType &type)
{
@@ -174,7 +174,7 @@ class MFSignatureBuilder {
template<typename T> void readonly_vector_input(StringRef name)
{
- this->readonly_vector_input(name, GET_TYPE<T>());
+ this->readonly_vector_input(name, CPP_TYPE<T>());
}
void readonly_vector_input(StringRef name, const CPPType &base_type)
{
@@ -184,7 +184,7 @@ class MFSignatureBuilder {
template<typename T> void vector_output(StringRef name)
{
- this->vector_output(name, GET_TYPE<T>());
+ this->vector_output(name, CPP_TYPE<T>());
}
void vector_output(StringRef name, const CPPType &base_type)
{
@@ -357,7 +357,7 @@ class MFParamsBuilder {
template<typename T> void add_readonly_single_input(const T *value)
{
m_virtual_list_refs.append(
- GenericVirtualListRef::FromSingle(GET_TYPE<T>(), (void *)value, m_min_array_size));
+ GenericVirtualListRef::FromSingle(CPP_TYPE<T>(), (void *)value, m_min_array_size));
}
void add_readonly_single_input(GenericVirtualListRef list)
diff --git a/source/blender/functions/FN_multi_function_data_type.h b/source/blender/functions/FN_multi_function_data_type.h
index af4cf02e4dc..32f0babcc2c 100644
--- a/source/blender/functions/FN_multi_function_data_type.h
+++ b/source/blender/functions/FN_multi_function_data_type.h
@@ -26,12 +26,12 @@ struct MFDataType {
template<typename T> static MFDataType ForSingle()
{
- return MFDataType(Category::Single, GET_TYPE<T>());
+ return MFDataType(Category::Single, CPP_TYPE<T>());
}
template<typename T> static MFDataType ForVector()
{
- return MFDataType(Category::Vector, GET_TYPE<T>());
+ return MFDataType(Category::Vector, CPP_TYPE<T>());
}
bool is_none() const
diff --git a/source/blender/functions/intern/cpp_types.cc b/source/blender/functions/intern/cpp_types.cc
index a81bb99172b..d1d48cb0101 100644
--- a/source/blender/functions/intern/cpp_types.cc
+++ b/source/blender/functions/intern/cpp_types.cc
@@ -85,7 +85,7 @@ template<typename T> static std::unique_ptr<const CPPType> create_cpp_type(Strin
#define MAKE_CPP_TYPE(IDENTIFIER, TYPE_NAME) \
static std::unique_ptr<const CPPType> CPPTYPE_##IDENTIFIER = create_cpp_type<TYPE_NAME>( \
STRINGIFY(IDENTIFIER)); \
- template<> const CPPType &GET_TYPE<TYPE_NAME>() \
+ template<> const CPPType &CPP_TYPE<TYPE_NAME>() \
{ \
return *CPPTYPE_##IDENTIFIER; \
}
diff --git a/source/blender/functions/intern/multi_functions/lists.h b/source/blender/functions/intern/multi_functions/lists.h
index 231b480f4ae..355df433c42 100644
--- a/source/blender/functions/intern/multi_functions/lists.h
+++ b/source/blender/functions/intern/multi_functions/lists.h
@@ -39,7 +39,7 @@ template<typename T> class MF_EmptyList : public MultiFunction {
public:
MF_EmptyList()
{
- MFSignatureBuilder signature("Empty List - " + GET_TYPE<T>().name());
+ MFSignatureBuilder signature("Empty List - " + CPP_TYPE<T>().name());
signature.vector_output<T>("Output");
this->set_signature(signature);
}
@@ -55,7 +55,7 @@ template<typename FromT, typename ToT> class MF_ConvertList : public MultiFuncti
public:
MF_ConvertList()
{
- MFSignatureBuilder signature(GET_TYPE<FromT>().name() + " List to " + GET_TYPE<ToT>().name() +
+ MFSignatureBuilder signature(CPP_TYPE<FromT>().name() + " List to " + CPP_TYPE<ToT>().name() +
" List");
signature.readonly_vector_input<FromT>("Inputs");
signature.vector_output<ToT>("Outputs");
@@ -83,7 +83,7 @@ template<typename T> class MF_SingleElementList : public MultiFunction {
public:
MF_SingleElementList()
{
- MFSignatureBuilder signature("Single Element List - " + GET_TYPE<T>().name());
+ MFSignatureBuilder signature("Single Element List - " + CPP_TYPE<T>().name());
signature.readonly_single_input<T>("Input");
signature.vector_output<T>("Outputs");
this->set_signature(signature);
diff --git a/source/blender/functions/intern/multi_functions/mixed.h b/source/blender/functions/intern/multi_functions/mixed.h
index 610ba378d71..f28f51ced10 100644
--- a/source/blender/functions/intern/multi_functions/mixed.h
+++ b/source/blender/functions/intern/multi_functions/mixed.h
@@ -65,7 +65,7 @@ template<typename T> class MF_ConstantValue : public MultiFunction {
public:
MF_ConstantValue(T value) : m_value(std::move(value))
{
- MFSignatureBuilder signature("Constant " + GET_TYPE<T>().name());
+ MFSignatureBuilder signature("Constant " + CPP_TYPE<T>().name());
signature.single_output<T>("Output");
this->set_signature(signature);
}
@@ -82,7 +82,7 @@ template<typename FromT, typename ToT> class MF_Convert : public MultiFunction {
public:
MF_Convert()
{
- MFSignatureBuilder signature(GET_TYPE<FromT>().name() + " to " + GET_TYPE<ToT>().name());
+ MFSignatureBuilder signature(CPP_TYPE<FromT>().name() + " to " + CPP_TYPE<ToT>().name());
signature.readonly_single_input<FromT>("Input");
signature.single_output<ToT>("Output");
this->set_signature(signature);
diff --git a/source/blender/functions/intern/vtree_multi_function_network/mappings_sockets.cc b/source/blender/functions/intern/vtree_multi_function_network/mappings_sockets.cc
index 1cc93145285..ff78c82d9f6 100644
--- a/source/blender/functions/intern/vtree_multi_function_network/mappings_sockets.cc
+++ b/source/blender/functions/intern/vtree_multi_function_network/mappings_sockets.cc
@@ -121,20 +121,20 @@ static void add_basic_type(VTreeMultiFunctionMappings &mappings,
std::string list_idname = "fn_" + base_name + "ListSocket";
std::string list_name = base_name + " List";
- mappings.cpp_type_by_type_name.add_new(base_name, &GET_TYPE<T>());
+ mappings.cpp_type_by_type_name.add_new(base_name, &CPP_TYPE<T>());
mappings.data_type_by_idname.add_new(base_idname, MFDataType::ForSingle<T>());
mappings.data_type_by_idname.add_new(list_idname, MFDataType::ForVector<T>());
mappings.input_inserters.add_new(base_idname, base_inserter);
mappings.input_inserters.add_new(list_idname, INSERT_empty_list_socket<T>);
mappings.conversion_inserters.add_new({base_idname, list_idname}, INSERT_element_to_list<T>);
- mappings.type_name_from_cpp_type.add_new(&GET_TYPE<T>(), base_name);
+ mappings.type_name_from_cpp_type.add_new(&CPP_TYPE<T>(), base_name);
}
template<typename FromT, typename ToT>
static void add_implicit_conversion(VTreeMultiFunctionMappings &mappings)
{
- StringRef from_name = mappings.type_name_from_cpp_type.lookup(&GET_TYPE<FromT>());
- StringRef to_name = mappings.type_name_from_cpp_type.lookup(&GET_TYPE<ToT>());
+ StringRef from_name = mappings.type_name_from_cpp_type.lookup(&CPP_TYPE<FromT>());
+ StringRef to_name = mappings.type_name_from_cpp_type.lookup(&CPP_TYPE<ToT>());
std::string from_base_idname = "fn_" + from_name + "Socket";
std::string from_list_idname = "fn_" + from_name + "ListSocket";
diff --git a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
index 142c1bd4a73..603467238ee 100644
--- a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
@@ -51,7 +51,7 @@ Mesh *MOD_functionpoints_do(FunctionPointsModifierData *fpmd,
params.add_readonly_single_input(&fpmd->control1);
params.add_readonly_single_input(&fpmd->control2);
- FN::GenericVectorArray vector_array{FN::GET_TYPE<float3>(), 1};
+ FN::GenericVectorArray vector_array{FN::CPP_TYPE<float3>(), 1};
params.add_vector_output(vector_array);
float current_frame = DEG_get_ctime(ctx->depsgraph);
diff --git a/source/blender/simulations/bparticles/c_wrapper.cpp b/source/blender/simulations/bparticles/c_wrapper.cpp
index 3b77d4dcc01..de4c7a5d19c 100644
--- a/source/blender/simulations/bparticles/c_wrapper.cpp
+++ b/source/blender/simulations/bparticles/c_wrapper.cpp
@@ -331,7 +331,7 @@ void BParticles_modifier_cache_state(BParticlesModifierData *bpmd,
position_attribute.values = (float *)MEM_malloc_arrayN(
cached_type.particle_amount, sizeof(float3), __func__);
container.flatten_attribute("Position",
- FN::GenericMutableArrayRef(FN::GET_TYPE<float3>(),
+ FN::GenericMutableArrayRef(FN::CPP_TYPE<float3>(),
position_attribute.values,
cached_type.particle_amount));
@@ -341,7 +341,7 @@ void BParticles_modifier_cache_state(BParticlesModifierData *bpmd,
size_attribute.values = (float *)MEM_malloc_arrayN(
cached_type.particle_amount, sizeof(float), __func__);
container.flatten_attribute("Size",
- FN::GenericMutableArrayRef(FN::GET_TYPE<float>(),
+ FN::GenericMutableArrayRef(FN::CPP_TYPE<float>(),
size_attribute.values,
cached_type.particle_amount));
@@ -351,7 +351,7 @@ void BParticles_modifier_cache_state(BParticlesModifierData *bpmd,
color_attribute.values = (float *)MEM_malloc_arrayN(
cached_type.particle_amount, sizeof(rgba_f), __func__);
container.flatten_attribute("Color",
- FN::GenericMutableArrayRef(FN::GET_TYPE<rgba_f>(),
+ FN::GenericMutableArrayRef(FN::CPP_TYPE<rgba_f>(),
color_attribute.values,
cached_type.particle_amount));
}