From 4d935db680321dadd036e3129b0970d39e815749 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 14 Nov 2026 14:40:08 -0300
Subject: akregator Metakit: Use nullptr for pointer defaults
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Replace typed null pointer constants in the embedded Metakit implementation while preserving scalar values and storage behavior.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 akregator/src/mk4storage/metakit/src/column.cpp  | 18 +++----
 akregator/src/mk4storage/metakit/src/custom.cpp  |  2 +-
 akregator/src/mk4storage/metakit/src/derived.cpp | 14 +++---
 akregator/src/mk4storage/metakit/src/field.cpp   |  6 +--
 akregator/src/mk4storage/metakit/src/fileio.cpp  | 12 ++---
 akregator/src/mk4storage/metakit/src/format.cpp  | 44 ++++++++---------
 akregator/src/mk4storage/metakit/src/handler.cpp | 30 ++++++------
 akregator/src/mk4storage/metakit/src/persist.cpp | 62 ++++++++++++------------
 akregator/src/mk4storage/metakit/src/remap.cpp   |  2 +-
 akregator/src/mk4storage/metakit/src/store.cpp   | 30 ++++++------
 akregator/src/mk4storage/metakit/src/string.cpp  | 14 +++---
 akregator/src/mk4storage/metakit/src/univ.cpp    | 14 +++---
 akregator/src/mk4storage/metakit/src/view.cpp    | 34 ++++++-------
 akregator/src/mk4storage/metakit/src/viewx.cpp   | 24 ++++-----
 14 files changed, 153 insertions(+), 153 deletions(-)

diff --git a/akregator/src/mk4storage/metakit/src/column.cpp b/akregator/src/mk4storage/metakit/src/column.cpp
index 1e4efb444..cf95ed942 100644
--- a/akregator/src/mk4storage/metakit/src/column.cpp
+++ b/akregator/src/mk4storage/metakit/src/column.cpp
@@ -102,20 +102,20 @@ c4_Strategy& c4_Column::Strategy() const
 
 bool c4_Column::IsMapped() const
 {
-  return _position > 1 && _persist != 0 && Strategy()._mapStart != 0;
+  return _position > 1 && _persist && Strategy()._mapStart;
 }
 
 bool c4_Column::UsesMap(const t4_byte* ptr_) const
 {
     // the most common falsifying case is checked first
-  return _persist != 0 && ptr_ >= Strategy()._mapStart &&
+  return _persist && ptr_ >= Strategy()._mapStart &&
         Strategy()._dataSize != 0 && // added  2003-05-08, thx V DeMarco
         ptr_ - Strategy()._mapStart < Strategy()._dataSize;
 }
 
 bool c4_Column::RequiresMap() const
 {
-  if (_persist != 0 && Strategy()._mapStart != 0)
+  if (_persist && Strategy()._mapStart)
     for (int i = _segments.GetSize(); --i >= 0; )
       if (UsesMap((t4_byte*) _segments.GetAt(i)))
 	return true;
@@ -507,7 +507,7 @@ void c4_Column::RemoveGap()
 
     if (n == 0) { // case 1
       ReleaseSegment(i);
-      _segments.SetAt(i, 0);
+      _segments.SetAt(i, nullptr);
     } else {
       if (n + _slack > kSegMax) // case 4
         ReleaseSegment(i+1);
@@ -558,7 +558,7 @@ void c4_Column::Grow(t4_i32 off_, t4_i32 diff_)
     else if (fSegRest(_gap))  // case 2
       moveBack = true;
 
-    _segments.InsertAt(i1, 0, n);
+    _segments.InsertAt(i1, nullptr, n);
     for (int i = 0; i < n; ++i)
       _segments.SetAt(i1 + i, d4_new t4_byte [(int) kSegMax]);
 
@@ -642,7 +642,7 @@ void c4_Column::Shrink(t4_i32 off_, t4_i32 diff_)
       d4_assert(i == _segments.GetSize() - 1);
 
       ReleaseSegment(i);
-      _segments.SetAt(i, 0);
+      _segments.SetAt(i, nullptr);
 
       _slack -= fSegRest(_size + _slack);
 
@@ -665,7 +665,7 @@ void c4_Column::Shrink(t4_i32 off_, t4_i32 diff_)
     ReleaseSegment(i);
 
     if (r + x < kSegMax)
-      _segments.SetAt(i, 0);
+      _segments.SetAt(i, nullptr);
     else
       _segments.RemoveAt(i);
 
@@ -696,7 +696,7 @@ void c4_Column::FinishSlack()
     CopyData(gapEnd - n, gapEnd, n);
 
     ReleaseSegment(i);
-    _segments.SetAt(i, 0);
+    _segments.SetAt(i, nullptr);
 
     _slack -= n;
     d4_assert(_slack >= 500);
@@ -1209,7 +1209,7 @@ void c4_ColOfInts::SetAccessWidth(int bits_)
 
   _currWidth = (1 << l2bp1) >> 1;
 
-  if (l2bp1 > 4 && (_mustFlip || ((Persist() != 0) && Strategy()._bytesFlipped)))
+  if (l2bp1 > 4 && (_mustFlip || (Persist() && Strategy()._bytesFlipped)))
     l2bp1 += 3; // switch to the trailing entries for byte flipping
 
   static tGetter gTab [] =
diff --git a/akregator/src/mk4storage/metakit/src/custom.cpp b/akregator/src/mk4storage/metakit/src/custom.cpp
index a6275cea7..70cef7878 100644
--- a/akregator/src/mk4storage/metakit/src/custom.cpp
+++ b/akregator/src/mk4storage/metakit/src/custom.cpp
@@ -95,7 +95,7 @@ c4_Handler* c4_CustomSeq::CreateHandler(const c4_Property& prop_)
 /////////////////////////////////////////////////////////////////////////////
 
 c4_CustomSeq::c4_CustomSeq (c4_CustomViewer* viewer_)
-  : c4_HandlerSeq (0), _viewer (viewer_), _inited (false)
+  : c4_HandlerSeq (nullptr), _viewer (viewer_), _inited (false)
 {
   d4_assert(_viewer != 0);
 
diff --git a/akregator/src/mk4storage/metakit/src/derived.cpp b/akregator/src/mk4storage/metakit/src/derived.cpp
index 3baf5e3e7..c9bf6923f 100644
--- a/akregator/src/mk4storage/metakit/src/derived.cpp
+++ b/akregator/src/mk4storage/metakit/src/derived.cpp
@@ -40,7 +40,7 @@ protected:
   void FixupReverseMap();
   int PosInMap(int index_) const;
   bool Match(int index_, c4_Sequence& seq_,
-        const int* =0, const int* =0) const;
+        const int* =nullptr, const int* =nullptr) const;
   bool MatchOne(int prop_, const c4_Bytes& data_) const;
 
 public:
@@ -310,7 +310,7 @@ int c4_FilterSeq::PosInMap(int index_) const
 c4_Notifier* c4_FilterSeq::PreChange(c4_Notifier& nf_)
 {
   if (!GetDependencies())
-    return 0;
+    return nullptr;
 
   c4_Notifier* chg = d4_new c4_Notifier (this);
 
@@ -644,7 +644,7 @@ void c4_SortSeq::MergeSort( T ar[] , int size )
 }
 
 c4_SortSeq::c4_SortSeq (c4_Sequence& seq_, c4_Sequence* down_)
-  : c4_FilterSeq (seq_), _info (0), _width (-1)
+  : c4_FilterSeq (seq_), _info (nullptr), _width (-1)
 {
   d4_assert(NumRows() == seq_.NumRows());
 
@@ -671,13 +671,13 @@ c4_SortSeq::c4_SortSeq (c4_Sequence& seq_, c4_Sequence* down_)
       _info[j]._context = _seq.HandlerContext(j);
     }
 
-    _info[j]._handler = 0;
+    _info[j]._handler = nullptr;
 
       // everything is ready, go sort the row index vector
     MergeSort((T*) &_rowMap.ElementAt(0), NumRows());
 
     delete [] _info;
-    _info = 0;
+    _info = nullptr;
 
     FixupReverseMap();
   }
@@ -730,7 +730,7 @@ int c4_SortSeq::PosInMap(c4_Cursor cursor_) const
 c4_Notifier* c4_SortSeq::PreChange(c4_Notifier& /*nf_*/)
 {
   if (!GetDependencies())
-    return 0;
+    return nullptr;
 
 #if 0
   c4_Notifier* chg = d4_new c4_Notifier (this);
@@ -785,7 +785,7 @@ c4_Notifier* c4_SortSeq::PreChange(c4_Notifier& /*nf_*/)
 #endif
 
 //  d4_assert(0); // fail, cannot handle a view dependent on this one yet
-  return 0;
+  return nullptr;
 }
 
 void c4_SortSeq::PostChange(c4_Notifier& nf_)
diff --git a/akregator/src/mk4storage/metakit/src/field.cpp b/akregator/src/mk4storage/metakit/src/field.cpp
index 3867d6b5c..ceab57746 100644
--- a/akregator/src/mk4storage/metakit/src/field.cpp
+++ b/akregator/src/mk4storage/metakit/src/field.cpp
@@ -31,7 +31,7 @@ c4_Field::c4_Field (const char*& description_, c4_Field* parent_)
   size_t n = strcspn(description_, ",[]");
   const char* p = strchr(description_, ':');
 
-  if (p != 0 && p < description_ + n) {
+  if (p && p < description_ + n) {
     _name = c4_String (description_, p - description_);
     _type = p[1] & ~0x20; // force to upper case
   } else {
@@ -61,10 +61,10 @@ c4_Field::c4_Field (const char*& description_, c4_Field* parent_)
 	for (int i = 0; i < NumSubFields(); ++i)
 	  if (SubField(i).Name().CompareNoCase(sf->Name()) == 0) {
 	    delete sf;
-	    sf = 0;
+	    sf = nullptr;
 	    break;
 	  }
-	if (sf != 0)
+	if (sf)
 	  _subFields.Add(sf);
       } while (*description_++ == ',');
   }
diff --git a/akregator/src/mk4storage/metakit/src/fileio.cpp b/akregator/src/mk4storage/metakit/src/fileio.cpp
index ce59917bd..5b4e49a7a 100644
--- a/akregator/src/mk4storage/metakit/src/fileio.cpp
+++ b/akregator/src/mk4storage/metakit/src/fileio.cpp
@@ -86,14 +86,14 @@ bool c4_FileStream::Write(const void* buffer_, int length_)
 // c4_FileStrategy
 
 c4_FileStrategy::c4_FileStrategy (FILE* file_)
-  : _file (file_), _cleanup (0)
+  : _file (file_), _cleanup (nullptr)
 {
   ResetFileMapping();
 }
 
 c4_FileStrategy::~c4_FileStrategy ()
 {
-  _file = 0;
+  _file = nullptr;
   ResetFileMapping();
 
   if (_cleanup)
@@ -104,7 +104,7 @@ c4_FileStrategy::~c4_FileStrategy ()
 
 bool c4_FileStrategy::IsValid() const
 { 
-  return _file != 0; 
+  return _file != nullptr;
 }
 
 t4_i32 c4_FileStrategy::FileSize()
@@ -204,12 +204,12 @@ bool c4_FileStrategy::DataOpen(const char* fname_, int mode_)
 #else
   _cleanup = _file = fopen(fname_, mode_ > 0 ? "r+b" : "rb");
 #if q4_UNIX
-  if (_file != 0)
+  if (_file)
     fcntl(fileno(_file), F_SETFD, FD_CLOEXEC);
 #endif //q4_UNIX
 #endif //q4_WIN32 && !q4_WINCE
 
-  if (_file != 0) {
+  if (_file) {
     ResetFileMapping();
     return true;
   }
@@ -222,7 +222,7 @@ bool c4_FileStrategy::DataOpen(const char* fname_, int mode_)
 #else
     _cleanup = _file = fopen(fname_, "w+b");
 #if q4_UNIX
-    if (_file != 0)
+    if (_file)
       fcntl(fileno(_file), F_SETFD, FD_CLOEXEC);
 #endif //q4_UNIX
 #endif //q4_WIN32 && !q4_WINCE
diff --git a/akregator/src/mk4storage/metakit/src/format.cpp b/akregator/src/mk4storage/metakit/src/format.cpp
index aa23e7391..f2687e803 100644
--- a/akregator/src/mk4storage/metakit/src/format.cpp
+++ b/akregator/src/mk4storage/metakit/src/format.cpp
@@ -47,7 +47,7 @@ d4_inline c4_HandlerSeq& c4_FormatHandler::Owner() const
 
 bool c4_FormatHandler::IsPersistent() const
 {
-  return _owner.Persist() != 0;
+  return _owner.Persist() != nullptr;
 }
 
 /////////////////////////////////////////////////////////////////////////////
@@ -100,7 +100,7 @@ void c4_FormatX::Commit(c4_SaveContext& ar_)
 
 void c4_FormatX::Define(int rows_, const t4_byte** ptr_)
 {
-  if (ptr_ != 0)
+  if (ptr_)
     _data.PullLocation(*ptr_);
     
   _data.SetRowCount(rows_);
@@ -183,7 +183,7 @@ int c4_FormatL::DoCompare(const c4_Bytes& b1_, const c4_Bytes& b2_)
 
 void c4_FormatL::Define(int rows_, const t4_byte** ptr_)
 {
-  if (ptr_ == 0 && rows_ > 0) {
+  if (!ptr_ && rows_ > 0) {
     d4_assert(_data.ColSize() == 0);
     _data.InsertData(0, rows_ * sizeof (t4_i64), true);
   }
@@ -253,7 +253,7 @@ int c4_FormatD::DoCompare(const c4_Bytes& b1_, const c4_Bytes& b2_)
 
 void c4_FormatD::Define(int rows_, const t4_byte** ptr_)
 {
-  if (ptr_ == 0 && rows_ > 0) {
+  if (!ptr_ && rows_ > 0) {
     d4_assert(_data.ColSize() == 0);
     _data.InsertData(0, rows_ * sizeof (double), true);
   }
@@ -375,7 +375,7 @@ d4_inline bool c4_FormatB::ShouldBeMemo(int length_) const
 int c4_FormatB::ItemLenOffCol(int index_, t4_i32& off_, c4_Column*& col_)
 {
   col_ = (c4_Column*) _memos.GetAt(index_);
-  if (col_ != 0) {
+  if (col_) {
     off_ = 0;
     return col_->ColSize();
   }
@@ -417,7 +417,7 @@ void c4_FormatB::Unmapped()
 
   for (int i = 0; i < _memos.GetSize(); ++i) {
     c4_Column* cp = (c4_Column*) _memos.GetAt(i);
-    if (cp != 0)
+    if (cp)
       cp->ReleaseAllSegments();
   }
 }
@@ -426,7 +426,7 @@ void c4_FormatB::Define(int, const t4_byte** ptr_)
 {
   d4_assert(_memos.GetSize() == 0);
   
-  if (ptr_ != 0) {
+  if (ptr_) {
     _data.PullLocation(*ptr_);
     if (_data.ColSize() > 0)
       _sizeCol.PullLocation(*ptr_);
@@ -646,7 +646,7 @@ void c4_FormatB::SetOne(int index_, const c4_Bytes& xbuf_, bool ignoreMemos_)
   t4_i32 start = Offset(index_);
   int len = Offset(index_ + 1) - start;
   
-  if (!ignoreMemos_ && _memos.GetAt(index_) != 0)
+  if (!ignoreMemos_ && _memos.GetAt(index_))
     len = ItemLenOffCol(index_, start, cp);
 
   int m = buf_.Size();
@@ -706,7 +706,7 @@ void c4_FormatB::Insert(int index_, const c4_Bytes& buf_, int count_)
   int m = buf_.Size();
   t4_i32 off = Offset(index_);
 
-  _memos.InsertAt(index_, 0, count_);
+  _memos.InsertAt(index_, nullptr, count_);
 
     // insert the appropriate number of bytes
   t4_i32 n = count_ * (t4_i32) m;
@@ -785,7 +785,7 @@ void c4_FormatB::Commit(c4_SaveContext& ar_)
   if (!full)
     for (int i = 0; i < rows; ++i) {
       c4_Column* col = (c4_Column*) _memos.GetAt(i);
-      if (col != 0) {
+      if (col) {
 	full = true;
         break;
       }
@@ -834,7 +834,7 @@ void c4_FormatB::Commit(c4_SaveContext& ar_)
 	  _sizeCol.SetInt(r, len);
 	  col->FetchBytes(start, len, temp, true);
 	  delete (c4_Column*) _memos.GetAt(r); // 28-11-2001: fix mem leak
-	  _memos.SetAt(r, 0); // 02-11-2001: fix for use after commit
+	  _memos.SetAt(r, nullptr); // 02-11-2001: fix for use after commit
 	}
       }
       
@@ -997,7 +997,7 @@ c4_HandlerSeq& c4_FormatV::At(int index_)
   d4_assert(_inited);
   
   c4_HandlerSeq*& hs = (c4_HandlerSeq*&) _subSeqs.ElementAt(index_);
-  if (hs == 0) {
+  if (!hs) {
     hs = d4_new c4_HandlerSeq (Owner(), this);
     hs->IncRef();
   }
@@ -1045,7 +1045,7 @@ void c4_FormatV::Define(int rows_, const t4_byte** ptr_)
   }
 
   _subSeqs.SetSize(rows_);
-  if (ptr_ != 0)
+  if (ptr_)
     _data.PullLocation(*ptr_);
 }
 
@@ -1060,7 +1060,7 @@ void c4_FormatV::OldDefine(char, c4_Persist& pers_)
       // 14-11-2000: do not create again (this causes a mem leak)
       // 04-12-2000: but do create if absent (fixes occasional crash)
       c4_HandlerSeq* hs = (c4_HandlerSeq*) _subSeqs.GetAt(i);
-      if (hs == 0) {
+      if (!hs) {
 	hs = d4_new c4_HandlerSeq (Owner(), this);
 	_subSeqs.SetAt(i, hs);
 	hs->IncRef();
@@ -1087,7 +1087,7 @@ int c4_FormatV::ItemSize(int index_)
 
   // 06-02-2002: avoid creating empty subview
   c4_HandlerSeq* hs = (c4_HandlerSeq*&) _subSeqs.ElementAt(index_);
-  return hs == 0 ? 0 : hs->NumRows();
+  return !hs ? 0 : hs->NumRows();
 }
 
 const void* c4_FormatV::Get(int index_, int& length_)
@@ -1124,13 +1124,13 @@ void c4_FormatV::Replace(int index_, c4_HandlerSeq* seq_)
   if (seq_ == curr)
     return;
 
-  if (curr != 0) {
+  if (curr) {
     d4_assert(&curr->Parent() == &Owner());
     curr->DetachFromParent();
     curr->DetachFromStorage(true);
 
     curr->DecRef();
-    curr = 0;
+    curr = nullptr;
   }
 
   if (seq_) {
@@ -1183,7 +1183,7 @@ void c4_FormatV::Insert(int index_, const c4_Bytes& buf_, int count_)
   if (!_inited)
     SetupAllSubviews();
 
-  _subSeqs.InsertAt(index_, 0, count_);
+  _subSeqs.InsertAt(index_, nullptr, count_);
   _data.SetBuffer(0); // 2004-01-18 force dirty
 }
 
@@ -1220,19 +1220,19 @@ bool c4_FormatV::HasSubview(int index_)
   if (!_inited)
     SetupAllSubviews();
 
-  return _subSeqs.ElementAt(index_) != 0;
+  return _subSeqs.ElementAt(index_) != nullptr;
 }
 
 void c4_FormatV::ForgetSubview(int index_)
 {
   c4_HandlerSeq*& seq = (c4_HandlerSeq*&) _subSeqs.ElementAt(index_);
-  if (seq != 0) {
+  if (seq) {
     d4_assert(&seq->Parent() == &Owner());
     seq->DetachFromParent();
     seq->DetachFromStorage(true);
     seq->UnmappedAll();
     seq->DecRef();
-    seq = 0;
+    seq = nullptr;
   } 
 }
 
@@ -1244,7 +1244,7 @@ void c4_FormatV::Commit(c4_SaveContext& ar_)
   int rows = _subSeqs.GetSize();
   d4_assert(rows > 0);
 
-  c4_Column temp (0);
+  c4_Column temp (nullptr);
   c4_Column* saved = ar_.SetWalkBuffer(&temp);
   
   for (int r = 0; r < rows; ++r) 
diff --git a/akregator/src/mk4storage/metakit/src/handler.cpp b/akregator/src/mk4storage/metakit/src/handler.cpp
index 6c68c5c3f..d6f2078f2 100644
--- a/akregator/src/mk4storage/metakit/src/handler.cpp
+++ b/akregator/src/mk4storage/metakit/src/handler.cpp
@@ -78,7 +78,7 @@ void c4_Handler::Move(int from_, int to_)
 // c4_HandlerSeq
 
 c4_HandlerSeq::c4_HandlerSeq (c4_Persist* persist_)
-  : _persist (persist_), _field (0), _parent (0), _numRows (0)
+  : _persist (persist_), _field (nullptr), _parent (nullptr), _numRows (0)
 { 
 }
 
@@ -101,7 +101,7 @@ c4_HandlerSeq::~c4_HandlerSeq ()
   const bool rootLevel = _parent == this;
   c4_Persist* pers = _persist;
 
-  if (rootLevel && pers != 0)
+  if (rootLevel && pers)
     pers->DoAutoCommit();
     
   DetachFromParent();
@@ -154,20 +154,20 @@ c4_Field& c4_HandlerSeq::Definition() const
 
 void c4_HandlerSeq::DetachFromParent()
 {
-  if (_field != 0) {
+  if (_field) {
     const char* desc = "[]";
     c4_Field f (desc);
     d4_assert(!*desc);
     Restructure(f, false);
-    _field = 0;
+    _field = nullptr;
   }
 
-  _parent = 0;
+  _parent = nullptr;
 }
 
 void c4_HandlerSeq::DetachFromStorage(bool full_)
 {
-  if (_persist != 0) {
+  if (_persist) {
     int limit = full_ ? 0 : NumFields();
 
       // get rid of all handlers which might do I/O
@@ -191,7 +191,7 @@ void c4_HandlerSeq::DetachFromStorage(bool full_)
 
     if (full_) {
       //UnmappedAll();
-      _persist = 0;
+      _persist = nullptr;
     }
   }
 }
@@ -225,8 +225,8 @@ const char* c4_HandlerSeq::Description()
 {
   // 19-01-2003: avoid too dense code, since Sun CC seems to choke on it
   //return _field != 0 ? UseTempBuffer(Definition().DescribeSubFields()) : 0;
-  if (_field == 0)
-    return 0;
+  if (!_field)
+    return nullptr;
   c4_String s = _field->DescribeSubFields(); 
   return UseTempBuffer(s);
 }
@@ -254,7 +254,7 @@ void c4_HandlerSeq::Restructure(c4_Field& field_, bool remove_)
      
     if (n < 0)   {
       _handlers.InsertAt(i, f4_CreateFormat(prop, *this));
-      NthHandler(i).Define(NumRows(), 0);
+      NthHandler(i).Define(NumRows(), nullptr);
     } else {
         // move the handler to the front
       d4_assert(n > i);
@@ -270,7 +270,7 @@ void c4_HandlerSeq::Restructure(c4_Field& field_, bool remove_)
   c4_Field* ofld = _field;
     // special case if we're "restructuring a view out of persistence", see below
     
-  _field = remove_ ? 0 : &field_;
+  _field = remove_ ? nullptr : &field_;
 
     // let handler do additional init once all have been prepared
   //for (int n = 0; n < NumHandlers(); ++n)
@@ -288,7 +288,7 @@ void c4_HandlerSeq::Restructure(c4_Field& field_, bool remove_)
 	  c4_HandlerSeq& seq = SubEntry(j, n);
 	  if (j < NumFields())
 	    seq.Restructure(field_.SubField(j), false);
-	  else if (seq._field != 0)
+	  else if (seq._field)
 	    seq.Restructure(temp, true);
 	}
     }
@@ -299,7 +299,7 @@ void c4_HandlerSeq::Restructure(c4_Field& field_, bool remove_)
 
 int c4_HandlerSeq::NumFields() const
 {
-  return _field != 0 ? _field->NumSubFields() : 0;
+  return _field ? _field->NumSubFields() : 0;
 }
 
 char c4_HandlerSeq::ColumnType(int index_) const
@@ -321,7 +321,7 @@ c4_Field& c4_HandlerSeq::Field(int index_) const
 
 void c4_HandlerSeq::Prepare(const t4_byte** ptr_, bool selfDesc_)
 {
-  if (ptr_ != 0) {
+  if (ptr_) {
     d4_dbgdef(t4_i32 sias =)
       c4_Column::PullValue(*ptr_);
     d4_assert(sias == 0); // not yet
@@ -467,7 +467,7 @@ c4_Field* c4_HandlerSeq::FindField(const c4_Handler* handler_)
   for (int i = 0; i < NumFields(); ++i)   
     if (handler_ == &NthHandler(i))
       return &Field(i);
-  return 0;
+  return nullptr;
 }
 
 void c4_HandlerSeq::UnmappedAll()
diff --git a/akregator/src/mk4storage/metakit/src/persist.cpp b/akregator/src/mk4storage/metakit/src/persist.cpp
index 65a9e94eb..07ff4d245 100644
--- a/akregator/src/mk4storage/metakit/src/persist.cpp
+++ b/akregator/src/mk4storage/metakit/src/persist.cpp
@@ -498,12 +498,12 @@ void c4_Differ::GetRoot(c4_Bytes& buffer_)
 
 c4_SaveContext::c4_SaveContext (c4_Strategy& strategy_, bool fullScan_,
       int mode_, c4_Differ* differ_, c4_Allocator* space_)
-  : _strategy (strategy_), _walk (0), _differ (differ_), _space (space_),
-    _cleanup (0), _nextSpace (0), _preflight (true), _fullScan (fullScan_),
+  : _strategy (strategy_), _walk (nullptr), _differ (differ_), _space (space_),
+    _cleanup (nullptr), _nextSpace (nullptr), _preflight (true), _fullScan (fullScan_),
     _mode (mode_), _nextPosIndex (0), _bufPtr (_buffer), _curr (_buffer),
     _limit (_buffer)
 {
-  if (_space == 0)
+  if (!_space)
     _space = _cleanup = d4_new c4_Allocator;
     
   _nextSpace = _mode == 1 ? d4_new c4_Allocator : _space;
@@ -529,14 +529,14 @@ bool c4_SaveContext::Serializing() const
 void c4_SaveContext::AllocDump(const char* str_, bool next_)
 {
   c4_Allocator* ap = next_ ? _nextSpace : _space;
-  if (ap != 0)
+  if (ap)
     ap->Dump(str_);
 }
 
 void c4_SaveContext::FlushBuffer()
 {
   int n = _curr - _bufPtr;
-  if (_walk != 0 && n > 0) {
+  if (_walk && n > 0) {
     t4_i32 end = _walk->ColSize();
     _walk->Grow(end, n);
     _walk->StoreBytes(end, c4_Bytes (_bufPtr, n));
@@ -571,7 +571,7 @@ void c4_SaveContext::Write(const void* buf_, int len_)
 
 void c4_SaveContext::StoreValue(t4_i32 v_)
 {
-  if (_walk == 0)
+  if (!_walk)
     return;
     
   if (_curr + 10 >= _limit)
@@ -592,7 +592,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_,
 
   const t4_i32 end = _fullScan ? 0 : size - _strategy._baseOffset;
 
-  if (_differ == 0) {
+  if (!_differ) {
     if (_mode != 1)
       _space->Initialize();
 
@@ -622,7 +622,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_,
   c4_Column walk (root_.Persist()); 
   SetWalkBuffer(&walk);
   CommitSequence(root_, true);
-  SetWalkBuffer(0);
+  SetWalkBuffer(nullptr);
   CommitColumn(walk);
   
   c4_Bytes tempWalk;
@@ -639,7 +639,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_,
 
     // special-case to avoid saving data if file is logically empty
   // in that case, the data is 0x80 0x81 0x80 (plus the header)
-  if (!_fullScan && limit <= 11 && _differ == 0) {
+  if (!_fullScan && limit <= 11 && !_differ) {
     _space->Initialize();
     _nextSpace->Initialize();
     changed = false;
@@ -651,7 +651,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_,
   //AllocDump("b1", false);
   //AllocDump("b2", true);
   
-  if (_differ != 0) {
+  if (_differ) {
     int n = _differ->NewDiffID();
     _differ->CreateDiff(n, walk);
     return;
@@ -776,7 +776,7 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_,
   }
 
     // if using memory mapped files, make sure the map is no longer in use
-  if (_strategy._mapStart != 0)
+  if (_strategy._mapStart)
     root_.UnmappedAll();
 
     // commit and tell strategy object what the new file size is, this
@@ -785,11 +785,11 @@ void c4_SaveContext::SaveIt(c4_HandlerSeq& root_, c4_Allocator** spacePtr_,
   
   d4_assert(_strategy.FileSize() - _strategy._baseOffset == end2);
 
-  if (spacePtr_ != 0 && _space != _nextSpace) {
+  if (spacePtr_ && _space != _nextSpace) {
     d4_assert(*spacePtr_ == _space);
     delete *spacePtr_;
     *spacePtr_ = _nextSpace;
-    _nextSpace = 0;
+    _nextSpace = nullptr;
   }
 }
 
@@ -859,9 +859,9 @@ void c4_SaveContext::CommitSequence(c4_HandlerSeq& seq_, bool selfDesc_)
 
 
 c4_Persist::c4_Persist (c4_Strategy& strategy_, bool owned_, int mode_)
-  : _space (0), _strategy (strategy_), _root (0), _differ (0),
-    _fCommit (0), _mode (mode_), _owned (owned_), _oldBuf (0),
-    _oldCurr (0), _oldLimit (0), _oldSeek (-1)
+  : _space (nullptr), _strategy (strategy_), _root (nullptr), _differ (nullptr),
+    _fCommit (0), _mode (mode_), _owned (owned_), _oldBuf (nullptr),
+    _oldCurr (nullptr), _oldLimit (nullptr), _oldSeek (-1)
 {
   if (_mode == 1)
     _space = d4_new c4_Allocator;
@@ -872,14 +872,14 @@ c4_Persist::~c4_Persist ()
   delete _differ;
 
   if (_owned) {
-    if (_root != 0)
+    if (_root)
       _root->UnmappedAll();
     delete &_strategy;
   }
     
   delete _space;
 
-  if (_oldBuf != 0)
+  if (_oldBuf)
     delete [] _oldBuf;
 }
 
@@ -926,7 +926,7 @@ bool c4_Persist::SetAside(c4_Storage& aside_)
 
 c4_Storage* c4_Persist::GetAside() const
 {
-  return _differ != 0 ? &_differ->_storage : 0;
+  return _differ ? &_differ->_storage : nullptr;
 }
 
 bool c4_Persist::Commit(bool full_)
@@ -937,10 +937,10 @@ bool c4_Persist::Commit(bool full_)
   if (!_strategy.IsValid())
     return false;
     
-  if (_mode == 0 && (_differ == 0 || full_)) // can't commit to r/o file
+  if (_mode == 0 && (!_differ || full_)) // can't commit to r/o file
     return false; // note that _strategy._failure is *zero* in this case
 
-  c4_SaveContext ar (_strategy, false, _mode, full_ ? 0 : _differ, _space);
+  c4_SaveContext ar (_strategy, false, _mode, full_ ? nullptr : _differ, _space);
 
   // get rid of temp properties which still use the datafile
   if (_mode == 1)
@@ -955,9 +955,9 @@ bool c4_Persist::Rollback(bool full_)
 {
   _root->DetachFromParent();
   _root->DetachFromStorage(true);
-  _root = 0;
+  _root = nullptr;
   
-  if (_space != 0)
+  if (_space)
     _space->Initialize();
 
   c4_HandlerSeq* seq = d4_new c4_HandlerSeq (this);
@@ -966,7 +966,7 @@ bool c4_Persist::Rollback(bool full_)
   
   if (full_) {
     delete _differ;
-    _differ = 0;
+    _differ = nullptr;
   }
 
   LoadAll();
@@ -990,7 +990,7 @@ bool c4_Persist::LoadIt(c4_Column& walk_)
     walk_.SetLocation(_strategy._rootPos, _strategy._rootLen);
 
     // if the file size has increased, we must remap
-  if (_strategy._mapStart != 0 && 
+  if (_strategy._mapStart &&
     _strategy.FileSize() > _strategy._baseOffset + _strategy._dataSize)
     _strategy.ResetFileMapping();
 
@@ -1104,7 +1104,7 @@ c4_HandlerSeq* c4_Persist::Load(c4_Stream* stream_)
 
   c4_FileMark head;
   if (stream_->Read(&head, sizeof head) != sizeof head || !head.IsHeader())
-    return 0; // no data in file
+    return nullptr; // no data in file
 
   //_oldStyle = head._data[3] == 0x80;
   d4_assert(!head.IsOldHeader());
@@ -1131,7 +1131,7 @@ c4_HandlerSeq* c4_Persist::Load(c4_Stream* stream_)
   if (!pers->LoadIt(walk)) {
     seq->IncRef();
     seq->DecRef(); // a funny way to delete
-    return 0;
+    return nullptr;
   }
   
   c4_Bytes tempWalk;
@@ -1152,12 +1152,12 @@ void c4_Persist::Save(c4_Stream* stream_, c4_HandlerSeq& root_)
 
   // 31-01-2002: streaming must adopt byte order of origin datafile
   c4_Persist* p = root_.Persist();
-  if (p != 0)
+  if (p)
     strat._bytesFlipped = p->Strategy()._bytesFlipped;
 
-  c4_SaveContext ar (strat, true, 0, 0, 0);
+  c4_SaveContext ar (strat, true, 0, nullptr, nullptr);
   c4_Bytes tempWalk;
-  ar.SaveIt(root_, 0, tempWalk);
+  ar.SaveIt(root_, nullptr, tempWalk);
 }
 
 t4_i32 c4_Persist::LookupAside(int id_)
@@ -1178,7 +1178,7 @@ void c4_Persist::OccupySpace(t4_i32 pos_, t4_i32 len_)
 {
   d4_assert(_mode != 1 || _space != 0);
   
-  if (_space != 0)
+  if (_space)
     _space->Occupy(pos_, len_);
 }
 
diff --git a/akregator/src/mk4storage/metakit/src/remap.cpp b/akregator/src/mk4storage/metakit/src/remap.cpp
index cc8175df2..204e349c4 100644
--- a/akregator/src/mk4storage/metakit/src/remap.cpp
+++ b/akregator/src/mk4storage/metakit/src/remap.cpp
@@ -66,7 +66,7 @@ class c4_HashViewer : public c4_CustomViewer
 
 public:
   c4_HashViewer (c4_Sequence& seq_, int numKeys_,
-	      c4_Sequence* map_=0);
+	      c4_Sequence* map_=nullptr);
   virtual ~c4_HashViewer ();
 
   virtual c4_View GetTemplate();
diff --git a/akregator/src/mk4storage/metakit/src/store.cpp b/akregator/src/mk4storage/metakit/src/store.cpp
index a32de665c..105219cf7 100644
--- a/akregator/src/mk4storage/metakit/src/store.cpp
+++ b/akregator/src/mk4storage/metakit/src/store.cpp
@@ -69,7 +69,7 @@ c4_Notifier::~c4_Notifier ()
 
       if (_chain && _chain->_origin == seq) {
         c4_Notifier* next = _chain->_next;
-        _chain->_next = 0;
+        _chain->_next = nullptr;
 
         delete _chain;
         
@@ -219,7 +219,7 @@ c4_Storage::c4_Storage (const char* fname_, int mode_)
 
 c4_Storage::c4_Storage (const c4_View& root_)
 {
-  if (root_.Persist() != 0) // only restore if view was indeed persistent
+  if (root_.Persist()) // only restore if view was indeed persistent
     *(c4_View*) this = root_;
   else // if this was not possible, start with a fresh empty storage
     Initialize(*d4_new c4_Strategy, true, 0);
@@ -274,10 +274,10 @@ c4_View c4_Storage::GetAs(const char* description_)
     // Dec 2001: now that GetAs is being used so much more frequently, 
     // add a quick check to see whether restructuring is needed at all
   const char* q = strchr(description_, '[');
-  if (q != 0) {
+  if (q) {
     c4_String vname (description_, q - description_);
     const char* d = Description(vname);
-    if (d != 0) {
+    if (d) {
       c4_String desc (d);
       if (("[" + desc + "]").CompareNoCase(q) == 0)
 	return View(vname);
@@ -354,7 +354,7 @@ c4_Strategy& c4_Storage::Strategy() const
   /// Return a description of the view structure (default is all)
 const char* c4_Storage::Description(const char* name_)
 {
-  if (name_ == 0 || *name_ == 0)
+  if (!name_ || *name_ == 0)
     return c4_View::Description();
 
   c4_View v = View(name_);
@@ -406,7 +406,7 @@ bool c4_Storage::AutoCommit(bool flag_)
 bool c4_Storage::LoadFrom(c4_Stream& stream_)
 {
   c4_HandlerSeq* newRoot = c4_Persist::Load(&stream_);
-  if (newRoot == 0)
+  if (!newRoot)
     return false;
 
     // fix commit-after-load bug, by using a full view copy
@@ -482,7 +482,7 @@ void c4_DerivedSeq::SetNumRows(int size_)
 c4_Notifier* c4_DerivedSeq::PreChange(c4_Notifier& nf_)
 {
   if (!GetDependencies())
-    return 0;
+    return nullptr;
 
   c4_Notifier* chg = d4_new c4_Notifier (this);
 
@@ -515,23 +515,23 @@ c4_Notifier* c4_DerivedSeq::PreChange(c4_Notifier& nf_)
 /////////////////////////////////////////////////////////////////////////////
 
 c4_StreamStrategy::c4_StreamStrategy (t4_i32 buflen_)
-  : _stream (0), _buffer (d4_new t4_byte [buflen_]), _buflen (buflen_), _position (0)
+  : _stream (nullptr), _buffer (d4_new t4_byte [buflen_]), _buflen (buflen_), _position (0)
 {
   _mapStart = _buffer;
   _dataSize = buflen_;
 }
 
 c4_StreamStrategy::c4_StreamStrategy (c4_Stream* stream_)
-  : _stream (stream_), _buffer (0), _buflen (0), _position (0)
+  : _stream (stream_), _buffer (nullptr), _buflen (0), _position (0)
 {
 }
 
 c4_StreamStrategy::~c4_StreamStrategy ()
 {
-  _mapStart = 0;
+  _mapStart = nullptr;
   _dataSize = 0;
   
-  if (_buffer != 0)
+  if (_buffer)
     delete [] _buffer;
 }
 
@@ -542,7 +542,7 @@ bool c4_StreamStrategy::IsValid() const
 
 int  c4_StreamStrategy::DataRead(t4_i32 pos_, void* buffer_, int length_)
 {
-  if (_buffer != 0) {
+  if (_buffer) {
     d4_assert(pos_ <= _buflen);
     _position = pos_ + _baseOffset;
 
@@ -552,7 +552,7 @@ int  c4_StreamStrategy::DataRead(t4_i32 pos_, void* buffer_, int length_)
       memcpy(buffer_, _buffer + _position, length_);
   } else {
     d4_assert(_position == pos_ + _baseOffset);
-    length_ = _stream != 0 ? _stream->Read(buffer_, length_) : 0;
+    length_ = _stream ? _stream->Read(buffer_, length_) : 0;
   }
 
   _position += length_;
@@ -561,7 +561,7 @@ int  c4_StreamStrategy::DataRead(t4_i32 pos_, void* buffer_, int length_)
 
 void c4_StreamStrategy::DataWrite(t4_i32 pos_, const void* buffer_, int length_)
 {
-  if (_buffer != 0) {
+  if (_buffer) {
     d4_assert(pos_ <= _buflen);
     _position = pos_ + _baseOffset;
 
@@ -572,7 +572,7 @@ void c4_StreamStrategy::DataWrite(t4_i32 pos_, const void* buffer_, int length_)
       memcpy(_buffer + _position, buffer_, n);
   } else {
     d4_assert(_position == pos_ + _baseOffset);
-    if (_stream != 0 && !_stream->Write(buffer_, length_))
+    if (_stream && !_stream->Write(buffer_, length_))
       ++_failure;
   }
 
diff --git a/akregator/src/mk4storage/metakit/src/string.cpp b/akregator/src/mk4storage/metakit/src/string.cpp
index 7db4ec219..8dff4791c 100644
--- a/akregator/src/mk4storage/metakit/src/string.cpp
+++ b/akregator/src/mk4storage/metakit/src/string.cpp
@@ -102,7 +102,7 @@
 //      this code (but a bit bulkier, it also has Unicode support).
   
   // 2001-11-27, stop releasing nullvec, to allow MT use
-  d4_reentrant static unsigned char* nullVec = 0;
+  d4_reentrant static unsigned char* nullVec = nullptr;
     
 static int fInc(unsigned char* p)
 {
@@ -136,7 +136,7 @@ c4_String::c4_String (char ch, int n /* =1 */)
 
 c4_String::c4_String (const char* p)
 {
-  Init(p, p != 0 ? strlen(p) : 0);
+  Init(p, p ? strlen(p) : 0);
 }
 
 c4_String::c4_String (const c4_String& s)
@@ -178,7 +178,7 @@ c4_String operator+ (const c4_String& a, const c4_String& b)
 
 void c4_String::Init(const void* p, int n)
 {
-  if (p == NULL || n <= 0)
+  if (!p || n <= 0)
   {
       //  Optimization to significantly speed-up init of empty strings:
       //  share a common entry, which avoids *LOTS* of tiny mem allocs.
@@ -269,25 +269,25 @@ int c4_String::CompareNoCase(const char* str) const
 int c4_String::Find(char ch) const
 {
   const char* p = strchr(Data(), ch);
-  return p != 0 ? p - Data() : -1;
+  return p ? p - Data() : -1;
 }
 
 int c4_String::ReverseFind(char ch) const
 {
   const char* p = strrchr(Data(), ch);
-  return p != 0 ? p - Data() : -1;
+  return p ? p - Data() : -1;
 }
 
 int c4_String::FindOneOf(const char* set) const
 {
   const char* p = strpbrk(Data(), set);
-  return p != 0 ? p - Data() : -1;
+  return p ? p - Data() : -1;
 }
 
 int c4_String::Find(const char* sub) const
 {
   const char* p = strstr(Data(), sub);
-  return p != 0 ? p - Data() : -1;
+  return p ? p - Data() : -1;
 }
 
 c4_String c4_String::SpanIncluding(const char* set) const
diff --git a/akregator/src/mk4storage/metakit/src/univ.cpp b/akregator/src/mk4storage/metakit/src/univ.cpp
index 8ce2aab0a..137aca0dd 100644
--- a/akregator/src/mk4storage/metakit/src/univ.cpp
+++ b/akregator/src/mk4storage/metakit/src/univ.cpp
@@ -38,7 +38,7 @@
 // c4_BaseArray
 
 c4_BaseArray::c4_BaseArray ()
-  : _data (0), _size (0)
+  : _data (nullptr), _size (0)
 {
 }
 
@@ -54,9 +54,9 @@ void c4_BaseArray::SetLength(int nNewSize)
 
   if (((_size - 1) ^ (nNewSize - 1)) >> bits) {
     const int n = (nNewSize + (1<<bits) - 1) & -(1<<bits);
-    _data = _data == 0 ? n == 0 ? (char*) 0
+    _data = !_data ? n == 0 ? nullptr
                   : (char*) malloc(n)
-               : n == 0 ? (free(_data), (char*) 0)
+               : n == 0 ? (free(_data), nullptr)
                   : (char*) realloc(_data, n);
   }
   
@@ -154,7 +154,7 @@ void c4_StringArray::SetSize(int nNewSize, int)
   int i = nNewSize;
   
   while (i < GetSize())
-    SetAt(i++, 0);
+    SetAt(i++, nullptr);
 
   _ptrs.SetSize(nNewSize);
 
@@ -173,14 +173,14 @@ void c4_StringArray::SetAt(int nIndex, const char* newElement)
 
 int c4_StringArray::Add(const char* newElement)
 {
-  int n = _ptrs.Add(0);
+  int n = _ptrs.Add(nullptr);
   SetAt(n, newElement);
   return n;
 }
 
 void c4_StringArray::InsertAt(int nIndex, const char* newElement, int nCount)
 {
-  _ptrs.InsertAt(nIndex, 0, nCount);
+  _ptrs.InsertAt(nIndex, nullptr, nCount);
 
   while (--nCount >= 0)
     SetAt(nIndex++, newElement);
@@ -189,7 +189,7 @@ void c4_StringArray::InsertAt(int nIndex, const char* newElement, int nCount)
 void c4_StringArray::RemoveAt(int nIndex, int nCount)
 {
   for (int i = 0; i < nCount; ++i)
-    SetAt(nIndex + i, 0);
+    SetAt(nIndex + i, nullptr);
 
   _ptrs.RemoveAt(nIndex, nCount);
 }
diff --git a/akregator/src/mk4storage/metakit/src/view.cpp b/akregator/src/mk4storage/metakit/src/view.cpp
index af2fc9fa2..187a3dccb 100644
--- a/akregator/src/mk4storage/metakit/src/view.cpp
+++ b/akregator/src/mk4storage/metakit/src/view.cpp
@@ -179,14 +179,14 @@ c4_View::c4_View (c4_Sequence* seq_)
   : _seq (seq_)
 {          
   if (!_seq)
-    _seq = d4_new c4_HandlerSeq (0);
+    _seq = d4_new c4_HandlerSeq (nullptr);
 
   _IncSeqRef();
 }
 
 /// Construct a view based on a custom viewer
 c4_View::c4_View (c4_CustomViewer* viewer_)
-  : _seq (0)
+  : _seq (nullptr)
 {
   d4_assert(viewer_);
 
@@ -199,15 +199,15 @@ c4_View::c4_View (c4_CustomViewer* viewer_)
 c4_View::c4_View (c4_Stream* stream_)
   : _seq (c4_Persist::Load(stream_))
 {
-  if (_seq == 0)
-    _seq = d4_new c4_HandlerSeq (0);
+  if (!_seq)
+    _seq = d4_new c4_HandlerSeq (nullptr);
 
   _IncSeqRef();
 }
 
 /// Construct an empty view with one property
 c4_View::c4_View (const c4_Property& prop_)
-  : _seq (d4_new c4_HandlerSeq (0))
+  : _seq (d4_new c4_HandlerSeq (nullptr))
 {          
   _IncSeqRef();
 
@@ -385,7 +385,7 @@ bool c4_View::IsCompatibleWith(const c4_View& dest_) const
     return false;
 
     // both must be in the same storage
-  if (h1->Persist() == 0 || h1->Persist() != h2->Persist())
+  if (!h1->Persist() || h1->Persist() != h2->Persist())
     return false;
 
     // both must have the same structure (is this expensive?)
@@ -967,7 +967,7 @@ int c4_View::Locate(const c4_RowRef& crit_, int* pos_) const
       u = curr._index;
   }
 
-  if (pos_ != 0)
+  if (pos_)
     *pos_ = u;
 
     // only look for more if the search hit an exact match
@@ -1115,7 +1115,7 @@ c4_Row operator+ (const c4_RowRef& a_, const c4_RowRef& b_)
 
 c4_Cursor c4_Row::Allocate()
 {
-  c4_Sequence* seq = d4_new c4_HandlerSeq (0);
+  c4_Sequence* seq = d4_new c4_HandlerSeq (nullptr);
   seq->IncRef();
   
   seq->Resize(1);
@@ -1148,35 +1148,35 @@ void c4_Row::Release(c4_Cursor row_)
   //
   // These are the only static variables in the entire Metakit core lib.
 
-  static c4_ThreadLock* sThreadLock = 0;
-  static c4_StringArray* sPropNames = 0;
-  static c4_DWordArray* sPropCounts = 0;
+  static c4_ThreadLock* sThreadLock = nullptr;
+  static c4_StringArray* sPropNames = nullptr;
+  static c4_DWordArray* sPropCounts = nullptr;
 
     /// Call this to get rid of some internal datastructues (on exit)
   void c4_Property::CleanupInternalData()
   {
     delete sPropNames;
-    sPropNames = 0; // race
+    sPropNames = nullptr; // race
 
     delete sPropCounts;
-    sPropCounts = 0; // race
+    sPropCounts = nullptr; // race
 
     delete sThreadLock;
-    sThreadLock = 0; // race
+    sThreadLock = nullptr; // race
   }
 
 c4_Property::c4_Property (char type_, const char* name_)
   : _type (type_)
 {
-  if (sThreadLock == 0)
+  if (!sThreadLock)
     sThreadLock = d4_new c4_ThreadLock;
 
   c4_ThreadLock::Hold lock; // grabs the lock until end of scope
 
-  if (sPropNames == 0)
+  if (!sPropNames)
     sPropNames = d4_new c4_StringArray;
 
-  if (sPropCounts == 0)
+  if (!sPropCounts)
     sPropCounts = d4_new c4_DWordArray;
 
   c4_String temp = name_;
diff --git a/akregator/src/mk4storage/metakit/src/viewx.cpp b/akregator/src/mk4storage/metakit/src/viewx.cpp
index db30d14e5..f01166d09 100644
--- a/akregator/src/mk4storage/metakit/src/viewx.cpp
+++ b/akregator/src/mk4storage/metakit/src/viewx.cpp
@@ -14,7 +14,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 c4_Sequence::c4_Sequence ()
-  : _refCount (0), _dependencies (0), _propertyLimit (0), _tempBuf (0)
+  : _refCount (0), _dependencies (nullptr), _propertyLimit (0), _tempBuf (nullptr)
 {            
 }
 
@@ -31,7 +31,7 @@ c4_Sequence::~c4_Sequence ()
 
 c4_Persist* c4_Sequence::Persist() const
 {
-  return 0;
+  return nullptr;
 }
 
   /// Increment the reference count of this sequence
@@ -143,7 +143,7 @@ int c4_Sequence::RemapIndex(int index_, const c4_Sequence* seq_) const
   /// Gives access to a general purpose temporary buffer
 c4_Bytes& c4_Sequence::Buffer()
 {
-  if (_tempBuf == 0)
+  if (!_tempBuf)
     _tempBuf = d4_new c4_Bytes;
   return *_tempBuf;
 }
@@ -338,7 +338,7 @@ int c4_Sequence::PropIndex(const c4_Property& prop_)
 
 const char* c4_Sequence::Description()
 {
-  return 0;
+  return nullptr;
 }
 
 int c4_Sequence::ItemSize(int index_, int propId_)
@@ -397,7 +397,7 @@ void c4_Sequence::Detach(c4_Sequence* child_)
   if (!_dependencies->Remove(child_))
   {
     delete _dependencies;
-    _dependencies = 0;
+    _dependencies = nullptr;
   }
 
   DecRef();
@@ -407,7 +407,7 @@ void c4_Sequence::Detach(c4_Sequence* child_)
 c4_Notifier* c4_Sequence::PreChange(c4_Notifier&)
 {
   d4_assert(0); // should not be called, because it should not attach
-  return 0;
+  return nullptr;
 }
 
   /// Called after changes have been made to the sequence
@@ -553,7 +553,7 @@ c4_Bytes c4_BytesRef::Access(t4_i32 off_, int len_) const
       len_ = sz - off_;
 
     c4_Column* col = h.GetNthMemoCol(_cursor._index, true);
-    if (col != 0)
+    if (col)
     {
 
       if (len_ > 0) {
@@ -587,7 +587,7 @@ bool c4_BytesRef::Modify(const c4_Bytes& buf_, t4_i32 off_, int diff_) const
       diff_ = overshoot;
 
     c4_Column* col = h.GetNthMemoCol(_cursor._index, true);
-    if (col != 0)
+    if (col)
     {
       if (diff_ < 0)
         col->Shrink(limit, - diff_);
@@ -641,7 +641,7 @@ c4_ViewRef::operator c4_View () const
 {
   c4_Bytes result;
   if (!GetData(result))
-    return (c4_Sequence*) 0; // resolve ambiguity
+    return (c4_Sequence*) nullptr; // resolve ambiguity
 
   d4_assert(result.Size() == sizeof (c4_Sequence*));
   return *(c4_Sequence* const*) result.Contents();
@@ -663,7 +663,7 @@ c4_Stream::~c4_Stream ()
 
 c4_Strategy::c4_Strategy ()
   : _bytesFlipped (false), _failure (0),
-    _mapStart (0), _dataSize (0), _baseOffset (0), _rootPos (-1), _rootLen (-1)
+    _mapStart (nullptr), _dataSize (0), _baseOffset (0), _rootPos (-1), _rootLen (-1)
 {
 }
 
@@ -720,7 +720,7 @@ void c4_Strategy::SetBase(t4_i32 base_)
   t4_i32 off = base_ - _baseOffset;
   _baseOffset = base_;
   _dataSize -= off;
-  if (_mapStart != 0)
+  if (_mapStart)
   _mapStart += off;
 }
 
@@ -838,7 +838,7 @@ t4_i32 c4_Strategy::EndOfData(t4_i32 end_)
   {
   _baseOffset += pos;
   d4_assert(_baseOffset >= 0);
-  if (_mapStart != 0)
+  if (_mapStart)
   {
     _mapStart += pos;
     _dataSize -= pos;
-- 
cgit v1.2.3

