Fixed variable not to use reference when copy is required
This commit is contained in:
parent
1f3ec76e0e
commit
987bfb1b49
1 changed files with 1 additions and 1 deletions
|
@ -894,7 +894,7 @@ static bandwidth_map::iterator add_bandwidth_entry(const std::string packet_type
|
|||
int day = timeinfo->tm_mday;
|
||||
assert(hour < 24 && hour >= 0);
|
||||
std::pair<bandwidth_map::iterator,bool> insertion = hour_stats[hour].insert(std::make_pair(packet_type, bandwidth_stats()));
|
||||
bandwidth_map::iterator& inserted = insertion.first;
|
||||
bandwidth_map::iterator inserted = insertion.first;
|
||||
if (!insertion.second && day != inserted->second.day)
|
||||
{
|
||||
// clear previuos day stats
|
||||
|
|
Loading…
Add table
Reference in a new issue