From f83debbd7e0f008881c317d3ffeafe7a4902ff1f Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 3 Oct 2026 17:49:18 -0300
Subject: Replace NULL pointer constants with nullptr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 src/svnqt/client_annotate.cpp |  6 +++---
 src/svnqt/client_diff.cpp     |  4 ++--
 src/svnqt/client_impl.cpp     |  4 ++--
 src/svnqt/client_lock.cpp     |  4 ++--
 src/svnqt/client_modify.cpp   | 30 +++++++++++++++---------------
 src/svnqt/client_property.cpp | 24 ++++++++++++------------
 src/svnqt/client_status.cpp   | 38 +++++++++++++++++++-------------------
 src/svnqt/contextdata.cpp     | 10 +++++-----
 src/svnqt/exception.cpp       |  2 +-
 src/svnqt/log_entry.cpp       |  4 ++--
 src/svnqt/repositorydata.cpp  |  4 ++--
 src/svnqt/status.h            |  4 ++--
 src/svnqt/wc.cpp              |  4 ++--
 13 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/src/svnqt/client_annotate.cpp b/src/svnqt/client_annotate.cpp
index 541d07e..bae1219 100644
--- a/src/svnqt/client_annotate.cpp
+++ b/src/svnqt/client_annotate.cpp
@@ -59,7 +59,7 @@ namespace svn
         entries->push_back (AnnotateLine(line_no, revision,author,
                             date,line,merge_revision,
                             merge_author,merge_date,merge_path));
-        return NULL;
+        return nullptr;
     }
 #else
   static svn_error_t *
@@ -78,7 +78,7 @@ namespace svn
                     date?date:"",
                     line?line:""));
 
-    return NULL;
+    return nullptr;
   }
 #endif
 
@@ -134,7 +134,7 @@ namespace svn
       *m_context, // client ctx
       pool);
 #endif
-    if (error != NULL)
+    if (error)
     {
       throw ClientException (error);
     }
diff --git a/src/svnqt/client_diff.cpp b/src/svnqt/client_diff.cpp
index de5bc75..0d7a8a2 100644
--- a/src/svnqt/client_diff.cpp
+++ b/src/svnqt/client_diff.cpp
@@ -108,7 +108,7 @@ namespace svn
                                  pool
                                 );
 #endif
-    if (error != NULL)
+    if (error)
     {
         throw ClientException (error);
     }
@@ -168,7 +168,7 @@ namespace svn
                              *m_context,
                              pool);
 #endif
-    if (error != NULL)
+    if (error)
     {
         throw ClientException (error);
     }
diff --git a/src/svnqt/client_impl.cpp b/src/svnqt/client_impl.cpp
index ced414c..4e790ca 100644
--- a/src/svnqt/client_impl.cpp
+++ b/src/svnqt/client_impl.cpp
@@ -53,13 +53,13 @@ apr_array_header_t* svn_sort__hash(apr_hash_t *ht,
 
   /* loop over hash table and push all keys into the array */
   sorted = true;
-  prev_item = NULL;
+  prev_item = nullptr;
   for (hi = apr_hash_first(pool, ht); hi; hi = apr_hash_next(hi))
 	{
 		svn_sort_item_type *item = (svn_sort_item_type*)apr_array_push(ary);
 		apr_hash_this(hi, &item->key, &item->klen, &item->value);
 
-		if (prev_item == NULL)
+		if (!prev_item)
 		{
 			prev_item = item;
 			continue;
diff --git a/src/svnqt/client_lock.cpp b/src/svnqt/client_lock.cpp
index 18357d5..4593894 100644
--- a/src/svnqt/client_lock.cpp
+++ b/src/svnqt/client_lock.cpp
@@ -43,7 +43,7 @@ namespace svn
                       steal_lock,
                       *m_context,
                       pool);
-    if(error != NULL)
+    if(error)
        throw ClientException (error);
   }
 
@@ -57,7 +57,7 @@ namespace svn
                         break_lock,
                         *m_context,
                         pool);
-    if(error != NULL)
+    if(error)
        throw ClientException (error);
   }
 }
diff --git a/src/svnqt/client_modify.cpp b/src/svnqt/client_modify.cpp
index 6e55f39..7c6efd0 100644
--- a/src/svnqt/client_modify.cpp
+++ b/src/svnqt/client_modify.cpp
@@ -83,7 +83,7 @@ namespace svn
                            *m_context,
                            subPool);
 #endif
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
     return revnum;
   }
@@ -162,7 +162,7 @@ namespace svn
                          *m_context,
                          pool);
 #endif
-    if(error != NULL) {
+    if(error) {
         throw ClientException (error);
     }
   }
@@ -191,7 +191,7 @@ namespace svn
                       *m_context,
                       pool);
 #endif
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
   }
 
@@ -223,7 +223,7 @@ namespace svn
     Q_UNUSED(allow_unversioned);
     error = svn_client_update2(&apr_revisions,path.array(pool),revision,recurse,ignore_externals,*m_context,pool);
 #endif
-    if (error!=NULL) {
+    if (error) {
         throw ClientException(error);
     }
     for (int i = 0; i < apr_revisions->nelts; ++i)
@@ -246,7 +246,7 @@ namespace svn
     Pool pool;
 
     m_context->setLogMessage (message);
-    svn_commit_info_t *commit_info = NULL;
+    svn_commit_info_t *commit_info = nullptr;
 
 #if ((SVN_VER_MAJOR == 1) && (SVN_VER_MINOR >= 5)) || (SVN_VER_MAJOR > 1)
     svn_error_t * error =
@@ -275,7 +275,7 @@ namespace svn
                          *m_context,
                          pool);
 #endif
-    if (error != NULL) {
+    if (error) {
         throw ClientException (error);
     }
 
@@ -357,7 +357,7 @@ namespace svn
       return copy(srcPath,srcRevision,srcRevision,destPath,true,false);
 #else
       Pool pool;
-    svn_commit_info_t *commit_info = NULL;
+    svn_commit_info_t *commit_info = nullptr;
     svn_error_t * error =
         svn_client_copy2
                     (&commit_info,
@@ -483,7 +483,7 @@ namespace svn
     Pool pool;
     m_context->setLogMessage(msg);
 
-    svn_commit_info_t *commit_info = NULL;
+    svn_commit_info_t *commit_info = nullptr;
 
     svn_error_t * error = 0;
 
@@ -506,7 +506,7 @@ namespace svn
     /* important! otherwise next op on repository uses that logmessage again! */
     m_context->setLogMessage(TQString());
 
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
     if (commit_info) {
         return commit_info->revision;
@@ -523,7 +523,7 @@ namespace svn
     svn_error_t * error =
       svn_client_cleanup (path.cstr (), *m_context, apr_pool);
 
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
   }
 
@@ -543,7 +543,7 @@ namespace svn
                            *m_context,
                            pool);
 #endif
-    if(error != NULL) {
+    if(error) {
         throw ClientException (error);
     }
   }
@@ -594,7 +594,7 @@ namespace svn
                          *m_context,
                          pool);
 #endif
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
     return revnum;
   }
@@ -642,7 +642,7 @@ namespace svn
                          *m_context,
                          pool);
 #endif
-    if(error != NULL) {
+    if(error) {
         throw ClientException (error);
     }
     return revnum;
@@ -658,7 +658,7 @@ namespace svn
                       )
 
   {
-    svn_commit_info_t *commit_info = NULL;
+    svn_commit_info_t *commit_info = nullptr;
     Pool pool;
 
     m_context->setLogMessage (message);
@@ -709,7 +709,7 @@ namespace svn
                          *m_context,
                          pool);
 
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
   }
 
diff --git a/src/svnqt/client_property.cpp b/src/svnqt/client_property.cpp
index e217e2f..4d8ccce 100644
--- a/src/svnqt/client_property.cpp
+++ b/src/svnqt/client_property.cpp
@@ -68,7 +68,7 @@ namespace svn
             const void *key;
             void *val;
 
-            apr_hash_this (hi, &key, NULL, &val);
+            apr_hash_this (hi, &key, nullptr, &val);
             prop_map[ TQString::FROMUTF8( (const char *)key ) ] =
                     TQString::FROMUTF8( ((const svn_string_t *)val)->data );
         }
@@ -117,7 +117,7 @@ namespace svn
                            pool);
 
 #endif
-    if(error != NULL)
+    if(error)
     {
       throw ClientException (error);
     }
@@ -137,7 +137,7 @@ namespace svn
         const void *key;
         void *val;
 
-        apr_hash_this (hi, &key, NULL, &val);
+        apr_hash_this (hi, &key, nullptr, &val);
         prop_map[ TQString::FROMUTF8( (const char *)key ) ] =
              TQString::FROMUTF8( ((const svn_string_t *)val)->data );
       }
@@ -187,7 +187,7 @@ namespace svn
                            pool);
 #endif
 
-    if(error != NULL)
+    if(error)
     {
       throw ClientException (error);
     }
@@ -204,7 +204,7 @@ namespace svn
       const void *key;
       void *val;
 
-      apr_hash_this (hi, &key, NULL, &val);
+      apr_hash_this (hi, &key, nullptr, &val);
       prop_map[propName] = TQString::FROMUTF8( ((const svn_string_t *)val)->data );
       path_prop_map_list.push_back( PathPropertiesMapEntry(TQString::FROMUTF8((const char *)key), prop_map ) );
     }
@@ -255,7 +255,7 @@ namespace svn
                             propval, path.cstr(),
                             recurse,skip_checks, *m_context, pool);
 #endif
-      if(error != NULL) {
+      if(error) {
           throw ClientException (error);
       }
     }
@@ -300,7 +300,7 @@ namespace svn
                                &revnum,
                                *m_context,
                                pool);
-    if(error != NULL)
+    if(error)
     {
       throw ClientException (error);
     }
@@ -314,7 +314,7 @@ namespace svn
       const void *key;
       void *val;
 
-      apr_hash_this (hi, &key, NULL, &val);
+      apr_hash_this (hi, &key, nullptr, &val);
       prop_map[ TQString::FROMUTF8( (const char *)key ) ] = TQString::FROMUTF8( ((const svn_string_t *)val)->data );
     }
 
@@ -349,13 +349,13 @@ namespace svn
                               &revnum,
                               *m_context,
                               pool);
-    if(error != NULL)
+    if(error)
     {
       throw ClientException (error);
     }
 
     // if the property does not exist NULL is returned
-    if( propval == NULL )
+    if( !propval )
         return TQPair<TQLONG,TQString>( 0, TQString() );
 
     return TQPair<TQLONG,TQString>( revnum, TQString::FROMUTF8(propval->data) );
@@ -398,7 +398,7 @@ namespace svn
                               force,
                               *m_context,
                               pool);
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
 
     return revnum;
@@ -435,7 +435,7 @@ namespace svn
                                       force,
                                       *m_context,
                                       pool);
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
 
     return revnum;
diff --git a/src/svnqt/client_status.cpp b/src/svnqt/client_status.cpp
index 7460745..4ea8ee3 100644
--- a/src/svnqt/client_status.cpp
+++ b/src/svnqt/client_status.cpp
@@ -111,17 +111,17 @@ namespace svn
         SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
     }
     entries->insert (entries->begin (), LogEntry (rev, author, date, msg));
-    if (changedPaths != NULL)
+    if (changedPaths)
     {
       LogEntry &entry = entries->front ();
 
       for (apr_hash_index_t *hi = apr_hash_first (pool, changedPaths);
-           hi != NULL;
+           hi;
            hi = apr_hash_next (hi))
       {
         const void *pv;
         void *val;
-        apr_hash_this (hi, &pv, NULL, &val);
+        apr_hash_this (hi, &pv, nullptr, &val);
 
         svn_log_changed_path_t *log_item = reinterpret_cast<svn_log_changed_path_t *> (val);
         const char* path = reinterpret_cast<const char*>(pv);
@@ -196,17 +196,17 @@ namespace svn
         SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
     }
     (*entries)[rev]=LogEntry(rev, author, date, msg);
-    if (changedPaths != NULL)
+    if (changedPaths)
     {
       LogEntry &entry = (*entries)[rev];
 
       for (apr_hash_index_t *hi = apr_hash_first (pool, changedPaths);
-           hi != NULL;
+           hi;
            hi = apr_hash_next (hi))
       {
         const void *pv;
         void *val;
-        apr_hash_this (hi, &pv, NULL, &val);
+        apr_hash_this (hi, &pv, nullptr, &val);
 
         svn_log_changed_path_t *log_item = reinterpret_cast<svn_log_changed_path_t *> (val);
         const char* path = reinterpret_cast<const char*>(pv);
@@ -220,7 +220,7 @@ namespace svn
       }
     }
 
-    return NULL;
+    return nullptr;
   }
 #endif
 
@@ -252,7 +252,7 @@ namespace svn
     path = apr_pstrdup (seb->pool, path);
     InfoEntry*e = new InfoEntry(info,path);
     apr_hash_set (seb->hash, path, APR_HASH_KEY_STRING, e);
-    return NULL;
+    return nullptr;
   }
 
   static void StatusEntriesFunc (void *baton,
@@ -320,7 +320,7 @@ namespace svn
       pool);
 #endif
 
-    if (error!=NULL)
+    if (error)
     {
       throw ClientException (error);
     }
@@ -335,7 +335,7 @@ namespace svn
     {
       const svn_sort_item_type *item;
       const char *filePath;
-      svn_wc_status2_t *status = NULL;
+      svn_wc_status2_t *status = nullptr;
 
       item = &APR_ARRAY_IDX (statusarray, i, const svn_sort_item_type);
       status = (svn_wc_status2_t *) item->value;
@@ -453,7 +453,7 @@ namespace svn
       *context,    //client ctx
       pool);
 #endif
-    if (error != NULL)
+    if (error)
     {
       throw ClientException (error);
     }
@@ -463,7 +463,7 @@ namespace svn
                             pool);
     const svn_sort_item_type *item;
     const char *filePath;
-    svn_wc_status2_t *status = NULL;
+    svn_wc_status2_t *status = nullptr;
 
     item = &APR_ARRAY_IDX (statusarray, 0, const svn_sort_item_type);
     status = (svn_wc_status2_t *) item->value;
@@ -559,7 +559,7 @@ namespace svn
       *m_context, // client ctx
       pool);
 #endif
-    if (error != NULL)
+    if (error)
     {
       throw ClientException (error);
     }
@@ -633,7 +633,7 @@ namespace svn
       *m_context, // client ctx
       pool);
 #endif
-    if (error != NULL)
+    if (error)
     {
       throw ClientException (error);
     }
@@ -652,7 +652,7 @@ namespace svn
 
     InfoEntries ientries;
     Pool pool;
-    svn_error_t *error = NULL;
+    svn_error_t *error = nullptr;
     StatusEntriesBaton baton;
     apr_hash_t *status_hash;
 
@@ -668,7 +668,7 @@ namespace svn
     error = svn_opt_parse_path(&pegr, &truepath,
                                  _buf,
                                  pool);
-    if (error != NULL)
+    if (error)
       throw ClientException (error);
 
     if (peg_revision.kind() == svn_opt_revision_unspecified) {
@@ -703,7 +703,7 @@ namespace svn
                       pool);
 #endif
 
-    if (error != NULL)
+    if (error)
       throw ClientException (error);
 
     apr_array_header_t *statusarray =
@@ -715,13 +715,13 @@ namespace svn
     for (i=0; i< statusarray->nelts; ++i)
     {
       const svn_sort_item_type *item;
-      InfoEntry*e = NULL;
+      InfoEntry*e = nullptr;
       item = &APR_ARRAY_IDX (statusarray, i, const svn_sort_item_type);
       e = (InfoEntry *) item->value;
       ientries.push_back(*e);
       delete e;
     }
-    if (error != NULL)
+    if (error)
       throw ClientException (error);
     return ientries;
   }
diff --git a/src/svnqt/contextdata.cpp b/src/svnqt/contextdata.cpp
index b670598..7bbb27d 100644
--- a/src/svnqt/contextdata.cpp
+++ b/src/svnqt/contextdata.cpp
@@ -330,14 +330,14 @@ const TQString&ContextData::configDir()const
 svn_error_t *
 ContextData::getContextData (void * baton, ContextData ** data)
 {
-    if (baton == NULL)
-        return svn_error_create (SVN_ERR_CANCELLED, NULL,
+    if (!baton)
+        return svn_error_create (SVN_ERR_CANCELLED, nullptr,
                                  "invalid baton");
 
     ContextData * data_ = static_cast <ContextData*>(baton);
 
     if (data_->listener == 0)
-        return svn_error_create (SVN_ERR_CANCELLED, NULL,
+        return svn_error_create (SVN_ERR_CANCELLED, nullptr,
                                  "invalid listener");
 
     *data = data_;
@@ -588,7 +588,7 @@ svn_error_t * ContextData::onSslServerTrustPrompt (svn_auth_cred_ssl_server_trus
       SVN_ERR (getContextData (baton, &data));
 
       ContextListener::SslServerTrustData trustData (failures);
-      if (realm != NULL)
+      if (realm)
         trustData.realm = realm;
       trustData.hostname = info->hostname;
       trustData.fingerprint = info->fingerprint;
@@ -764,7 +764,7 @@ svn_error_t* ContextData::onWcConflictResolver(svn_wc_conflict_result_t**result,
     Q_UNUSED(description);
     Q_UNUSED(baton);
     Q_UNUSED(pool);
-    return svn_error_create (SVN_ERR_CANCELLED, NULL,"invalid subversion version.");
+    return svn_error_create (SVN_ERR_CANCELLED, nullptr,"invalid subversion version.");
 #endif
 }
 
diff --git a/src/svnqt/exception.cpp b/src/svnqt/exception.cpp
index 203f4f0..ebd7c59 100644
--- a/src/svnqt/exception.cpp
+++ b/src/svnqt/exception.cpp
@@ -124,7 +124,7 @@ namespace svn
         message += TQString(" Line %1").arg(error->line);
       }
     }
-    while (next != NULL && next->message != NULL)
+    while (next && next->message)
     {
       message = message + "\n" + TQString::FROMUTF8(next->message);
 
diff --git a/src/svnqt/log_entry.cpp b/src/svnqt/log_entry.cpp
index 69d3b12..d168b49 100644
--- a/src/svnqt/log_entry.cpp
+++ b/src/svnqt/log_entry.cpp
@@ -102,12 +102,12 @@ namespace svn
       revision = log_entry->revision;
       if (log_entry->changed_paths) {
         for (apr_hash_index_t *hi = apr_hash_first (pool, log_entry->changed_paths);
-            hi != NULL;
+            hi;
             hi = apr_hash_next (hi))
         {
             const void *pv;
             void *val;
-            apr_hash_this (hi, &pv, NULL, &val);
+            apr_hash_this (hi, &pv, nullptr, &val);
             svn_log_changed_path_t *log_item = reinterpret_cast<svn_log_changed_path_t *> (val);
             const char* path = reinterpret_cast<const char*>(pv);
             changedPaths.push_back (LogChangePathEntry (path,log_item->action,log_item->copyfrom_path,log_item->copyfrom_rev) );
diff --git a/src/svnqt/repositorydata.cpp b/src/svnqt/repositorydata.cpp
index 320139f..9619cc3 100644
--- a/src/svnqt/repositorydata.cpp
+++ b/src/svnqt/repositorydata.cpp
@@ -177,11 +177,11 @@ svn_error_t * RepositoryData::CreateOpen(const TQString&path, const TQString&fst
     repository_path = svn_path_internal_style(repository_path, m_Pool);
 
     if (svn_path_is_url(repository_path)) {
-        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, nullptr,
             "'%s' is an URL when it should be a path",repository_path);
     }
     SVN_ERR(svn_repos_create(&m_Repository, repository_path,
-            NULL, NULL,config, fs_config,m_Pool));
+            nullptr, nullptr,config, fs_config,m_Pool));
 
     svn_fs_set_warning_func(svn_repos_fs(m_Repository), RepositoryData::warning_func, this);
 
diff --git a/src/svnqt/status.h b/src/svnqt/status.h
index 9f285ac..036e7e4 100644
--- a/src/svnqt/status.h
+++ b/src/svnqt/status.h
@@ -67,14 +67,14 @@ namespace svn
      * @param path path for this status entry
      * @param status status entry
      */
-    Status (const TQString&path=TQString(), svn_wc_status2_t * status = NULL);
+    Status (const TQString&path=TQString(), svn_wc_status2_t * status = nullptr);
     /**
      * default constructor
      *
      * @param path path for this status entry
      * @param status status entry
      */
-    Status (const char*path, svn_wc_status2_t * status = NULL);
+    Status (const char*path, svn_wc_status2_t * status = nullptr);
     /**
      * converting constructor
      */
diff --git a/src/svnqt/wc.cpp b/src/svnqt/wc.cpp
index 413fb10..77a3c22 100644
--- a/src/svnqt/wc.cpp
+++ b/src/svnqt/wc.cpp
@@ -52,7 +52,7 @@ namespace svn
         path.path().TOUTF8(),
         &wc, pool);
 
-    if ((error != NULL) || (wc == 0))
+    if ((error) || (wc == 0))
     {
       return false;
     }
@@ -75,7 +75,7 @@ namespace svn
                          urlPath.path().TOUTF8(),    // url
                          revision.revnum (),  // revision
                          pool);
-    if(error != NULL)
+    if(error)
       throw ClientException (error);
   }
 
-- 
cgit v1.2.3

