Cleanup: Compiler warning about unused ntree with node socket tooltips
This commit is contained in:
@@ -1450,7 +1450,7 @@ static void node_socket_tooltip_set(uiBlock &block,
|
||||
const int index_in_tree = POINTER_AS_INT(argN);
|
||||
ntree.ensure_topology_cache();
|
||||
const bNodeSocket &socket = *ntree.all_sockets()[index_in_tree];
|
||||
build_socket_tooltip(tip, C, but, ntree, socket);
|
||||
build_socket_tooltip(tip, C, but, socket);
|
||||
},
|
||||
POINTER_FROM_INT(socket_index_in_tree),
|
||||
nullptr);
|
||||
@@ -1509,7 +1509,7 @@ static void node_socket_add_tooltip_in_node_editor(const bNodeSocket &sock, uiLa
|
||||
const int index_in_tree = POINTER_AS_INT(argN);
|
||||
ntree.ensure_topology_cache();
|
||||
const bNodeSocket &socket = *ntree.all_sockets()[index_in_tree];
|
||||
build_socket_tooltip(tip, C, but, ntree, socket);
|
||||
build_socket_tooltip(tip, C, but, socket);
|
||||
},
|
||||
POINTER_FROM_INT(sock.index_in_tree()),
|
||||
nullptr,
|
||||
@@ -1531,7 +1531,7 @@ void node_socket_add_tooltip(const bNodeTree &ntree, const bNodeSocket &sock, ui
|
||||
&layout,
|
||||
[](bContext &C, uiTooltipData &tip, uiBut *but, void *argN) {
|
||||
SocketTooltipData *data = static_cast<SocketTooltipData *>(argN);
|
||||
build_socket_tooltip(tip, C, but, *data->ntree, *data->socket);
|
||||
build_socket_tooltip(tip, C, but, *data->socket);
|
||||
},
|
||||
data,
|
||||
MEM_dupallocN,
|
||||
@@ -1936,7 +1936,7 @@ static void node_draw_panels(bNodeTree &ntree, const bNode &node, uiBlock &block
|
||||
const int index_in_tree = POINTER_AS_INT(argN);
|
||||
ntree.ensure_topology_cache();
|
||||
const bNodeSocket &socket = *ntree.all_sockets()[index_in_tree];
|
||||
build_socket_tooltip(tip, C, but, ntree, socket);
|
||||
build_socket_tooltip(tip, C, but, socket);
|
||||
},
|
||||
POINTER_FROM_INT(input_socket->index_in_tree()),
|
||||
nullptr);
|
||||
|
||||
@@ -452,7 +452,6 @@ void NODE_OT_sockets_sync(wmOperatorType *ot);
|
||||
void build_socket_tooltip(uiTooltipData &tip_data,
|
||||
bContext &C,
|
||||
uiBut *but,
|
||||
const bNodeTree &tree,
|
||||
const bNodeSocket &socket);
|
||||
|
||||
} // namespace blender::ed::space_node
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace blender::ed::space_node {
|
||||
class SocketTooltipBuilder {
|
||||
private:
|
||||
uiTooltipData &tip_data_;
|
||||
const bNodeTree &tree_;
|
||||
const bNode &node_;
|
||||
const bNodeSocket &socket_;
|
||||
uiBut *but_ = nullptr;
|
||||
@@ -50,17 +49,8 @@ class SocketTooltipBuilder {
|
||||
std::optional<TooltipBlockType> last_block_type_;
|
||||
|
||||
public:
|
||||
SocketTooltipBuilder(uiTooltipData &tip_data,
|
||||
const bNodeTree &tree,
|
||||
const bNodeSocket &socket,
|
||||
bContext &C,
|
||||
uiBut *but)
|
||||
: tip_data_(tip_data),
|
||||
tree_(tree),
|
||||
node_(socket.owner_node()),
|
||||
socket_(socket),
|
||||
but_(but),
|
||||
C_(C)
|
||||
SocketTooltipBuilder(uiTooltipData &tip_data, const bNodeSocket &socket, bContext &C, uiBut *but)
|
||||
: tip_data_(tip_data), node_(socket.owner_node()), socket_(socket), but_(but), C_(C)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -874,10 +864,9 @@ class SocketTooltipBuilder {
|
||||
void build_socket_tooltip(uiTooltipData &tip_data,
|
||||
bContext &C,
|
||||
uiBut *but,
|
||||
const bNodeTree &tree,
|
||||
const bNodeSocket &socket)
|
||||
{
|
||||
SocketTooltipBuilder builder(tip_data, tree, socket, C, but);
|
||||
SocketTooltipBuilder builder(tip_data, socket, C, but);
|
||||
builder.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user