From 7f019cfba63adbe8fee8ecfa637c354e69e42c57 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Sat, 20 Feb 2016 22:22:35 -0800 Subject: [PATCH] Bug 1160368 - Part 2: Clean up some cruft in nsCookie.h from PRBool/bool conversions. r=jdm Also make nsCookie's member variables private. --- netwerk/cookie/nsCookie.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/netwerk/cookie/nsCookie.h b/netwerk/cookie/nsCookie.h index 3c06df5d6a0a..58154b0fa0c9 100644 --- a/netwerk/cookie/nsCookie.h +++ b/netwerk/cookie/nsCookie.h @@ -56,9 +56,9 @@ class nsCookie : public nsICookie2 , mExpiry(aExpiry) , mLastAccessed(aLastAccessed) , mCreationTime(aCreationTime) - , mIsSession(aIsSession != false) - , mIsSecure(aIsSecure != false) - , mIsHttpOnly(aIsHttpOnly != false) + , mIsSession(aIsSession) + , mIsSecure(aIsSecure) + , mIsHttpOnly(aIsHttpOnly) , mOriginAttributes(aOriginAttributes) { } @@ -101,7 +101,7 @@ class nsCookie : public nsICookie2 // setters inline void SetExpiry(int64_t aExpiry) { mExpiry = aExpiry; } inline void SetLastAccessed(int64_t aTime) { mLastAccessed = aTime; } - inline void SetIsSession(bool aIsSession) { mIsSession = (bool) aIsSession; } + inline void SetIsSession(bool aIsSession) { mIsSession = aIsSession; } // Set the creation time manually, overriding the monotonicity checks in // Create(). Use with caution! inline void SetCreationTime(int64_t aTime) { mCreationTime = aTime; } @@ -111,6 +111,7 @@ class nsCookie : public nsICookie2 protected: virtual ~nsCookie() {} + private: // member variables // we use char* ptrs to store the strings in a contiguous block, // so we save on the overhead of using nsCStrings. However, we