Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: crypto/scoped_nss_types.h

Issue 357783003: Remove some unnecessary ifs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/scoped_nss_types.h
diff --git a/crypto/scoped_nss_types.h b/crypto/scoped_nss_types.h
index d5aebc5dd205c97cd55d253b3dbc95f45d65af6a..8e96e8d4e20ffedb34a529e62ec7e92451bd8c5d 100644
--- a/crypto/scoped_nss_types.h
+++ b/crypto/scoped_nss_types.h
@@ -17,16 +17,14 @@ namespace crypto {
template <typename Type, void (*Destroyer)(Type*)>
struct NSSDestroyer {
void operator()(Type* ptr) const {
- if (ptr)
- Destroyer(ptr);
+ Destroyer(ptr);
}
};
template <typename Type, void (*Destroyer)(Type*, PRBool), PRBool freeit>
struct NSSDestroyer1 {
void operator()(Type* ptr) const {
- if (ptr)
- Destroyer(ptr, freeit);
+ Destroyer(ptr, freeit);
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698