[pan] and thats the lot



commit bd1ee7c2e2570944270607e6a332681b7a283df2
Author: Thomas Tanner <thosrtanner googlemail com>
Date:   Sat Oct 1 09:18:00 2022 +0100

    and thats the lot

 pan/general/text-match.cc  | 10 +++++-----
 pan/general/utf8-utils.cc  |  2 +-
 pan/general/worker-pool.cc |  6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/pan/general/text-match.cc b/pan/general/text-match.cc
index a76d6f5..244e356 100644
--- a/pan/general/text-match.cc
+++ b/pan/general/text-match.cc
@@ -165,7 +165,7 @@ class pan::TextMatch::PcreInfo
 
    public:
 
-      PcreInfo (): re(0) { }
+      PcreInfo (): re(nullptr) { }
 
 
 
@@ -188,7 +188,7 @@ class pan::TextMatch::PcreInfo
           else
             options = (GRegexCompileFlags)G_REGEX_CASELESS;
 
-          GError * err = 0;
+          GError * err = nullptr;
           re = g_regex_new (pattern.c_str(), options, (GRegexMatchFlags)0, &err);
           if (err) {
             Log::add_err_va (_("Can't use regular expression \"%s\": %s"), pattern.c_str(), err->message);
@@ -390,7 +390,7 @@ TextMatch :: test (const StringView& text_in) const
 TextMatch :: TextMatch ():
    _impl_text (),
    _skip (new char [UCHAR_MAX+1]),
-   _pcre_info (0),
+   _pcre_info (nullptr),
    _pcre_state (NEED_COMPILE)
 {
 }
@@ -410,7 +410,7 @@ TextMatch :: clear ()
   if (_pcre_state == COMPILED)
   {
     delete _pcre_info;
-    _pcre_info = 0;
+    _pcre_info = nullptr;
     _pcre_state = NEED_COMPILE;
   }
 }
@@ -497,7 +497,7 @@ TextMatch :: validate_regex (const char * text)
 
 TextMatch :: TextMatch (const TextMatch& that):
   _skip (new char [UCHAR_MAX+1]),
-  _pcre_info (0),
+  _pcre_info (nullptr),
   _pcre_state (NEED_COMPILE)
 {
   set (that.state);
diff --git a/pan/general/utf8-utils.cc b/pan/general/utf8-utils.cc
index 2a40478..275300d 100644
--- a/pan/general/utf8-utils.cc
+++ b/pan/general/utf8-utils.cc
@@ -195,7 +195,7 @@ pan :: content_to_utf8 (const StringView  & content,
 
       // try each charset in turn
       for (size_t i=0; i!=n; ++i) {
-        char * tmp = g_convert (content.str, content.len, "UTF-8", encodings[i], 0, 0, NULL);
+        char * tmp = g_convert (content.str, content.len, "UTF-8", encodings[i], nullptr, nullptr, NULL);
         if (tmp) {
           ret = tmp;
           g_free (tmp);
diff --git a/pan/general/worker-pool.cc b/pan/general/worker-pool.cc
index c530b4f..ea24b5f 100644
--- a/pan/general/worker-pool.cc
+++ b/pan/general/worker-pool.cc
@@ -32,7 +32,7 @@ using namespace pan;
 WorkerPool::WorkerPool(int n, bool exclusive)
 {
   assert((!exclusive || n>0) && "can't have unlimited exclusive threads!");
-  tpool = g_thread_pool_new(Worker::worker_thread_func, this, n, exclusive, 0);
+  tpool = g_thread_pool_new(Worker::worker_thread_func, this, n, exclusive, nullptr);
 }
 
 void
@@ -44,7 +44,7 @@ WorkerPool::cancel_all_silently()
 WorkerPool::~WorkerPool()
 {
   foreach (WorkerSet, my_workers, it){
-    (*it)->pool = 0;
+    (*it)->pool = nullptr;
     (*it)->cancel ();
   }
 
@@ -65,7 +65,7 @@ WorkerPool::push_work(Worker *w, Worker::Listener *l, bool delete_worker)
   w->listener = l;
   w->delete_worker = delete_worker;
   my_workers.insert(w);
-  g_thread_pool_push(tpool, w, 0); // jump to worker_thread_func
+  g_thread_pool_push(tpool, w, nullptr); // jump to worker_thread_func
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]