From acdfd5706edfdba2ec5980d83b841c360cb93c6d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Feb 2020 16:48:18 +0100 Subject: [PATCH] Anon: remove unnecessary {map,vector}::clear() calls The destructor will do this automatically. --- src/Anon.cc | 2 -- src/Anon.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Anon.cc b/src/Anon.cc index 0c511ee158..691cf7f2d5 100644 --- a/src/Anon.cc +++ b/src/Anon.cc @@ -144,8 +144,6 @@ AnonymizeIPAddr_A50::~AnonymizeIPAddr_A50() { for ( unsigned int i = 0; i < blocks.size(); ++i ) delete [] blocks[i]; - - blocks.clear(); } void AnonymizeIPAddr_A50::init() diff --git a/src/Anon.h b/src/Anon.h index 6c3125f94c..8bd9861e2a 100644 --- a/src/Anon.h +++ b/src/Anon.h @@ -40,7 +40,7 @@ typedef uint32_t ipaddr32_t; class AnonymizeIPAddr { public: - virtual ~AnonymizeIPAddr() { mapping.clear(); } + virtual ~AnonymizeIPAddr() = default; ipaddr32_t Anonymize(ipaddr32_t addr);