Cleanup: remove use of 'auto'

This commit is contained in:
Campbell Barton 2023-09-08 16:53:27 +10:00
parent 0ff8ed788d
commit 5ab2f61d44
9 changed files with 15 additions and 13 deletions

View File

@ -129,7 +129,8 @@ void Evaluator::map_node_operation_inputs_to_their_results(DNode node,
* origin is the input socket itself or the input is connected to an unlinked input of a group
* input node and the origin is the input of the group input node. So map the input to the
* result of a newly created Input Single Value Operation. */
auto *input_operation = new InputSingleValueOperation(context_, DInputSocket(dorigin));
InputSingleValueOperation *input_operation = new InputSingleValueOperation(
context_, DInputSocket(dorigin));
operation->map_input_to_result(input->identifier, &input_operation->get_result());
operations_stream_.append(std::unique_ptr<InputSingleValueOperation>(input_operation));

View File

@ -763,7 +763,7 @@ static void OVERLAY_engine_free()
static void OVERLAY_instance_free(void *instance_)
{
auto *instance = (Instance *)instance_;
Instance *instance = (Instance *)instance_;
if (instance != nullptr) {
delete instance;
}

View File

@ -96,7 +96,7 @@ static void OVERLAY_next_draw_scene(void *vedata)
static void OVERLAY_next_instance_free(void *instance_)
{
auto *instance = (Instance *)instance_;
Instance *instance = (Instance *)instance_;
if (instance != nullptr) {
delete instance;
}

View File

@ -90,7 +90,7 @@ static void SELECT_next_draw_scene(void *vedata)
static void SELECT_next_instance_free(void *instance_)
{
auto *instance = (Instance *)instance_;
Instance *instance = (Instance *)instance_;
if (instance != nullptr) {
delete instance;
}

View File

@ -365,14 +365,14 @@ void gpu_shader_create_info_init()
g_interfaces = new InterfaceDictionnary();
#define GPU_SHADER_INTERFACE_INFO(_interface, _inst_name) \
auto *ptr_##_interface = new StageInterfaceInfo(#_interface, _inst_name); \
auto &_interface = *ptr_##_interface; \
StageInterfaceInfo *ptr_##_interface = new StageInterfaceInfo(#_interface, _inst_name); \
StageInterfaceInfo &_interface = *ptr_##_interface; \
g_interfaces->add_new(#_interface, ptr_##_interface); \
_interface
#define GPU_SHADER_CREATE_INFO(_info) \
auto *ptr_##_info = new ShaderCreateInfo(#_info); \
auto &_info = *ptr_##_info; \
ShaderCreateInfo *ptr_##_info = new ShaderCreateInfo(#_info); \
ShaderCreateInfo &_info = *ptr_##_info; \
g_create_infos->add_new(#_info, ptr_##_info); \
_info

View File

@ -3139,7 +3139,7 @@ static bNode *find_node_by_repeat_item(PointerRNA *ptr)
bNodeTree *ntree = reinterpret_cast<bNodeTree *>(ptr->owner_id);
ntree->ensure_topology_cache();
for (bNode *node : ntree->nodes_by_type("GeometryNodeRepeatOutput")) {
auto *storage = static_cast<NodeGeometryRepeatOutput *>(node->storage);
NodeGeometryRepeatOutput *storage = static_cast<NodeGeometryRepeatOutput *>(node->storage);
if (storage->items_span().contains_ptr(item)) {
return node;
}
@ -3202,7 +3202,7 @@ static void rna_RepeatItem_name_set(PointerRNA *ptr, const char *value)
{
bNode *node = find_node_by_repeat_item(ptr);
NodeRepeatItem *item = static_cast<NodeRepeatItem *>(ptr->data);
auto *storage = static_cast<NodeGeometryRepeatOutput *>(node->storage);
NodeGeometryRepeatOutput *storage = static_cast<NodeGeometryRepeatOutput *>(node->storage);
storage->set_item_name(*item, value);
}

View File

@ -64,7 +64,7 @@ static void node_geo_exec(GeoNodeExecParams params)
float fps = 0.0f;
if (ImageAnim *ianim = static_cast<ImageAnim *>(image->anims.first)) {
auto *anim = ianim->anim;
anim *anim = ianim->anim;
if (anim) {
frames = IMB_anim_get_duration(anim, IMB_TC_NONE);

View File

@ -195,7 +195,8 @@ void move_simulation_state_to_values(const Span<NodeSimulationItem> node_simulat
const bke::bake::BakeSocketConfig config = make_bake_socket_config(node_simulation_items);
Vector<bke::bake::BakeItem *> bake_items;
for (const NodeSimulationItem &item : node_simulation_items) {
auto *bake_item = zone_state.items_by_id.lookup_ptr(item.identifier);
std::unique_ptr<bke::bake::BakeItem> *bake_item = zone_state.items_by_id.lookup_ptr(
item.identifier);
bake_items.append(bake_item ? bake_item->get() : nullptr);
}

View File

@ -322,7 +322,7 @@ static PyObject *pygpu_interface_info__tp_new(PyTypeObject * /*type*/,
StageInterfaceInfo *interface = new StageInterfaceInfo(name, "");
GPUStageInterfaceInfo *interface_info = reinterpret_cast<GPUStageInterfaceInfo *>(interface);
auto *self = BPyGPUStageInterfaceInfo_CreatePyObject(interface_info);
PyObject *self = BPyGPUStageInterfaceInfo_CreatePyObject(interface_info);
#ifdef USE_GPU_PY_REFERENCES
PyObject *py_name = PyTuple_GET_ITEM(args, 0);