trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: coverity 1021729 : clean up constructor
Date Wed, 10 May 2017 14:27:29 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/master by this push:
       new  bed25f8   coverity 1021729 : clean up constructor
bed25f8 is described below

commit bed25f845e7c4a0d5ca419fafccc49fac82ba15d
Author: Jason Kenny <dragon512@live.com>
AuthorDate: Mon May 8 13:57:50 2017 -0400

    coverity 1021729 : clean up constructor
    
    clang format fix
    clean up unused code
---
 lib/ts/Map.h | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/lib/ts/Map.h b/lib/ts/Map.h
index 5301ae9..84811da 100644
--- a/lib/ts/Map.h
+++ b/lib/ts/Map.h
@@ -61,14 +61,9 @@ public:
     return e.key == key;
   }
   operator uintptr_t(void) { return (uintptr_t)(uintptr_t)key; }
-  MapElem(uintptr_t x)
-  {
-    ink_assert(!x);
-    key = 0;
-  }
-  MapElem(K akey, C avalue) : key(akey), value(avalue) {}
-  MapElem(MapElem &e) : key(e.key), value(e.value) {}
-  MapElem() : key(0) {}
+  MapElem(K const &akey, C const &avalue) : key(akey), value(avalue) {}
+  MapElem(MapElem const &e) : key(e.key), value(e.value) {}
+  MapElem() : key(), value() {}
 };
 
 template <class K, class C, class A = DefaultAlloc> class Map : public Vec<MapElem<K,
C>, A>

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Mime
View raw message