]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3459: wizard: Use const reference instead of copying
authorMike Stepanek (mstepane) <mstepane@cisco.com>
Wed, 8 Jun 2022 10:19:22 +0000 (10:19 +0000)
committerMike Stepanek (mstepane) <mstepane@cisco.com>
Wed, 8 Jun 2022 10:19:22 +0000 (10:19 +0000)
Merge in SNORT/snort3 from ~DKYRYLOV/snort3:wizard_vtune_perf_fix to master

Squashed commit of the following:

commit b08b178af712f78da901496e6252b21f0c4037e8
Author: dkyrylov <dkyrylov@cisco.com>
Date:   Tue Jun 7 13:04:19 2022 +0300

    wizard: use const reference instead of copying

src/service_inspectors/wizard/wizard.cc

index 48cff8bbab0b945d87510032e8410c706f9bef02..68e6505919bbdbf0137587afa17ce6bcf5812bf1 100644 (file)
@@ -276,9 +276,7 @@ void Wizard::reset(Wand& w, bool tcp, bool c2s)
 
     if ( w.curse_tracker.empty() )
     {
-        vector<const CurseDetails*> pages = curses->get_curses(tcp);
-
-        for ( const CurseDetails* curse : pages )
+        for ( const CurseDetails* curse : curses->get_curses(tcp) )
         {
             if ( tcp )
                 w.curse_tracker.emplace_back( CurseServiceTracker{ curse, new CurseTracker } );