mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Deprecate TableVal::Assign methods with Val*, add IntrusivePtr overloads
This commit is contained in:
parent
5bf2ed02d7
commit
7e89c8f0df
22 changed files with 106 additions and 95 deletions
|
@ -280,7 +280,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
|
|||
if ( parts[i][0] == '@' )
|
||||
parts[i] = parts[i].substr(1);
|
||||
auto idx = make_intrusive<StringVal>(parts[i].c_str());
|
||||
set->Assign(idx.get(), nullptr);
|
||||
set->Assign(std::move(idx), nullptr);
|
||||
}
|
||||
|
||||
EnqueueConnEvent(irc_names_info,
|
||||
|
@ -471,7 +471,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
|
|||
for ( unsigned int i = 0; i < parts.size(); ++i )
|
||||
{
|
||||
auto idx = make_intrusive<StringVal>(parts[i].c_str());
|
||||
set->Assign(idx.get(), nullptr);
|
||||
set->Assign(std::move(idx), nullptr);
|
||||
}
|
||||
|
||||
EnqueueConnEvent(irc_whois_channel_line,
|
||||
|
@ -849,7 +849,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
|
|||
string empty_string = "";
|
||||
for ( unsigned int i = 0; i < channels.size(); ++i )
|
||||
{
|
||||
RecordVal* info = new RecordVal(irc_join_info);
|
||||
auto info = make_intrusive<RecordVal>(irc_join_info);
|
||||
info->Assign(0, make_intrusive<StringVal>(nickname.c_str()));
|
||||
info->Assign(1, make_intrusive<StringVal>(channels[i].c_str()));
|
||||
if ( i < passwords.size() )
|
||||
|
@ -858,8 +858,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
|
|||
info->Assign(2, make_intrusive<StringVal>(empty_string.c_str()));
|
||||
// User mode.
|
||||
info->Assign(3, make_intrusive<StringVal>(empty_string.c_str()));
|
||||
list->Assign(info, nullptr);
|
||||
Unref(info);
|
||||
list->Assign(std::move(info), nullptr);
|
||||
}
|
||||
|
||||
EnqueueConnEvent(irc_join_message,
|
||||
|
@ -919,7 +918,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
|
|||
info->Assign(2, make_intrusive<StringVal>(empty_string.c_str()));
|
||||
// User mode:
|
||||
info->Assign(3, make_intrusive<StringVal>(mode.c_str()));
|
||||
list->Assign(info.get(), nullptr);
|
||||
list->Assign(std::move(info), nullptr);
|
||||
}
|
||||
|
||||
EnqueueConnEvent(irc_join_message,
|
||||
|
@ -958,7 +957,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig)
|
|||
for ( unsigned int i = 0; i < channelList.size(); ++i )
|
||||
{
|
||||
auto idx = make_intrusive<StringVal>(channelList[i].c_str());
|
||||
set->Assign(idx.get(), nullptr);
|
||||
set->Assign(std::move(idx), nullptr);
|
||||
}
|
||||
|
||||
EnqueueConnEvent(irc_part_message,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue