]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/base/CbDataList.h
Maintenance: Removed most NULLs using modernize-use-nullptr (#1075)
[thirdparty/squid.git] / src / base / CbDataList.h
index 7388ee897c39be4393468028f96bc3e44444ecd4..9290dd4f00977daee59f8c5d040be112ae4b42dd 100644 (file)
@@ -59,7 +59,7 @@ public:
         return entry->element;
     }
     bool end() {
-        return next_entry == NULL;
+        return next_entry == nullptr;
     }
 
 private:
@@ -72,7 +72,7 @@ cbdata_type CbDataList<C>::CBDATA_CbDataList = CBDATA_UNKNOWN;
 /** \endcond */
 
 template <class C>
-CbDataList<C>::CbDataList(C const &value) : next(NULL), element (value)
+CbDataList<C>::CbDataList(C const &value) : next(nullptr), element (value)
 {}
 
 template <class C>
@@ -109,7 +109,7 @@ template <class C>
 bool
 CbDataList<C>::find (C const &toFind) const
 {
-    CbDataList<C> const *node = NULL;
+    CbDataList<C> const *node = nullptr;
 
     for (node = this; node; node = node->next)
         if (node->element == toFind)
@@ -145,7 +145,7 @@ CbDataList<C>::findAndTune(C const & toFind)
 }
 
 template <class C>
-CbDataListContainer<C>::CbDataListContainer() : head (NULL)
+CbDataListContainer<C>::CbDataListContainer() : head (nullptr)
 {}
 
 template <class C>
@@ -162,7 +162,7 @@ CbDataListContainer<C>::push_back (C const &element)
     CbDataList<C> *node = new CbDataList<C> (element);
 
     if (head) {
-        CbDataList<C> *tempNode = NULL;
+        CbDataList<C> *tempNode = nullptr;
 
         for (tempNode = head; tempNode->next; tempNode = tempNode->next);
         tempNode->next = node;
@@ -192,7 +192,7 @@ template <class C>
 bool
 CbDataListContainer<C>::empty() const
 {
-    return head == NULL;
+    return head == nullptr;
 }
 
 #endif /* SQUID_CBDATALIST_H */