mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 14:26:39 +02:00
core: use variable "items_count" directly from hashtable without calling function hashtable_get_integer
This commit is contained in:
@@ -4521,7 +4521,7 @@ COMMAND_CALLBACK(secure)
|
||||
_("Passphrase deleted") : _("Passphrase is not set"));
|
||||
if (passphrase_was_set)
|
||||
{
|
||||
if (hashtable_get_integer (secure_hashtable_data, "items_count") > 0)
|
||||
if (secure_hashtable_data->items_count > 0)
|
||||
command_save_file (secure_config_file);
|
||||
secure_buffer_display ();
|
||||
}
|
||||
@@ -4532,7 +4532,7 @@ COMMAND_CALLBACK(secure)
|
||||
gui_chat_printf (NULL,
|
||||
(passphrase_was_set) ?
|
||||
_("Passphrase changed") : _("Passphrase added"));
|
||||
if (hashtable_get_integer (secure_hashtable_data, "items_count") > 0)
|
||||
if (secure_hashtable_data->items_count > 0)
|
||||
command_save_file (secure_config_file);
|
||||
secure_buffer_display ();
|
||||
}
|
||||
|
||||
@@ -369,10 +369,8 @@ debug_hdata_map_cb (void *data, struct t_hashtable *hashtable,
|
||||
gui_chat_printf (NULL,
|
||||
" hdata 0x%lx: \"%s\", %d vars, %d lists:",
|
||||
ptr_hdata, (const char *)key,
|
||||
hashtable_get_integer (ptr_hdata->hash_var,
|
||||
"items_count"),
|
||||
hashtable_get_integer (ptr_hdata->hash_list,
|
||||
"items_count"));
|
||||
ptr_hdata->hash_var->items_count,
|
||||
ptr_hdata->hash_list->items_count);
|
||||
|
||||
/* display lists */
|
||||
hashtable_map (ptr_hdata->hash_list,
|
||||
@@ -412,7 +410,7 @@ debug_hdata ()
|
||||
{
|
||||
int count;
|
||||
|
||||
count = hashtable_get_integer (weechat_hdata, "items_count");
|
||||
count = weechat_hdata->items_count;
|
||||
|
||||
gui_chat_printf (NULL, "");
|
||||
gui_chat_printf (NULL, "%d hdata in memory", count);
|
||||
|
||||
@@ -751,7 +751,7 @@ secure_data_write_cb (void *data, struct t_config_file *config_file,
|
||||
if (!config_file_write_line (config_file, section_name, NULL))
|
||||
return WEECHAT_CONFIG_WRITE_ERROR;
|
||||
|
||||
if (hashtable_get_integer (secure_hashtable_data, "items_count") > 0)
|
||||
if (secure_hashtable_data->items_count > 0)
|
||||
{
|
||||
/*
|
||||
* write a special line indicating if a passphrase must be used to
|
||||
@@ -1040,7 +1040,7 @@ secure_buffer_display ()
|
||||
}
|
||||
|
||||
/* display secured data */
|
||||
if (hashtable_get_integer (secure_hashtable_data, "items_count") > 0)
|
||||
if (secure_hashtable_data->items_count > 0)
|
||||
{
|
||||
gui_chat_printf_y (secure_buffer, 4, _("Secured data:"));
|
||||
line = 6;
|
||||
|
||||
@@ -933,8 +933,7 @@ gui_color_buffer_display ()
|
||||
}
|
||||
|
||||
/* display palette colors */
|
||||
if (hashtable_get_integer (gui_color_hash_palette_color,
|
||||
"items_count") > 0)
|
||||
if (gui_color_hash_palette_color->items_count > 0)
|
||||
{
|
||||
y++;
|
||||
gui_chat_printf_y (gui_color_buffer, y++,
|
||||
|
||||
Reference in New Issue
Block a user