Commit aa9f4e61 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

NULL is deprecated

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1250
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 8b846289
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: README.changelog,v 1.27 2002-12-29 23:02:15 forbrig Exp $ * $Id: README.changelog,v 1.28 2002-12-31 15:56:45 forbrig Exp $
* *
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt) * Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
* *
...@@ -21,12 +21,16 @@ ...@@ -21,12 +21,16 @@
/*! \page page_changelog ChangeLog (AFF) /*! \page page_changelog ChangeLog (AFF)
$Id: README.changelog,v 1.27 2002-12-29 23:02:15 forbrig Exp $ $Id: README.changelog,v 1.28 2002-12-31 15:56:45 forbrig Exp $
\sa \ref page_project_status \sa \ref page_project_status
Major changes in the interface of the library are marked by \b !!. Major changes in the interface of the library are marked by \b !!.
- \b 31/12/2002 (thof)
- NULL is deprecated as pointed out by Wolfgang (replaced by literal 0 in
lib/error.cc and lib/sharedheap_def.h)
- \b 29/12/2002 (thof) - \b 29/12/2002 (thof)
- aff::ConstArray and aff::ConstSeries now inherit from - aff::ConstArray and aff::ConstSeries now inherit from
aff::ConstSharedHeap. See "\ref sec_design_replicated". aff::ConstSharedHeap. See "\ref sec_design_replicated".
...@@ -137,7 +141,7 @@ ...@@ -137,7 +141,7 @@
/*! \page page_project_status Project status (AFF) /*! \page page_project_status Project status (AFF)
$Id: README.changelog,v 1.27 2002-12-29 23:02:15 forbrig Exp $ $Id: README.changelog,v 1.28 2002-12-31 15:56:45 forbrig Exp $
\sa \ref page_changelog \sa \ref page_changelog
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: error.cc,v 1.3 2002-12-20 18:22:19 forbrig Exp $ * $Id: error.cc,v 1.4 2002-12-31 15:56:45 forbrig Exp $
* \author Thomas Forbriger * \author Thomas Forbriger
* \date 27/11/2002 * \date 27/11/2002
* *
...@@ -16,13 +16,15 @@ ...@@ -16,13 +16,15 @@
* - 10/12/2002 V1.0 copied from libtfxx * - 10/12/2002 V1.0 copied from libtfxx
* - 16/12/2002 V1.1 (thof) * - 16/12/2002 V1.1 (thof)
* - now contains AllocException too * - now contains AllocException too
* - 31/12/2002 V1.2 (thof)
* - NULL is deprecated as pointed out by Wolfgang
* *
* ============================================================================ * ============================================================================
*/ */
#define AFF_ERROR_CC_VERSION \ #define AFF_ERROR_CC_VERSION \
"AFF_ERROR_CC V1.1" "AFF_ERROR_CC V1.2"
#define AFF_ERROR_CC_CVSID \ #define AFF_ERROR_CC_CVSID \
"$Id: error.cc,v 1.3 2002-12-20 18:22:19 forbrig Exp $" "$Id: error.cc,v 1.4 2002-12-31 15:56:45 forbrig Exp $"
#include <iostream> #include <iostream>
#include <aff/lib/error.h> #include <aff/lib/error.h>
...@@ -37,25 +39,25 @@ namespace aff { ...@@ -37,25 +39,25 @@ namespace aff {
//! construct from nothing //! construct from nothing
Exception::Exception(): Exception::Exception():
Mmessage(NULL), Mfile(NULL), Mline(0), Mcondition(NULL) Mmessage(0), Mfile(0), Mline(0), Mcondition(0)
{ if (Mreport_on_construct) { report(); } } { if (Mreport_on_construct) { report(); } }
//! construct with message //! construct with message
Exception::Exception(const char* message): Exception::Exception(const char* message):
Mmessage(message), Mfile(NULL), Mline(0), Mcondition(NULL) Mmessage(message), Mfile(0), Mline(0), Mcondition(0)
{ if (Mreport_on_construct) { report(); } } { if (Mreport_on_construct) { report(); } }
//! construct with message and file info //! construct with message and file info
Exception::Exception(const char* message, Exception::Exception(const char* message,
const char* condition): const char* condition):
Mmessage(message), Mfile(NULL), Mline(0), Mcondition(condition) Mmessage(message), Mfile(0), Mline(0), Mcondition(condition)
{ if (Mreport_on_construct) { report(); } } { if (Mreport_on_construct) { report(); } }
//! construct with message and file info //! construct with message and file info
Exception::Exception(const char* message, Exception::Exception(const char* message,
const char* file, const char* file,
const int& line): const int& line):
Mmessage(message), Mfile(file), Mline(line), Mcondition(NULL) Mmessage(message), Mfile(file), Mline(line), Mcondition(0)
{ if (Mreport_on_construct) { report(); } } { if (Mreport_on_construct) { report(); } }
//! construct with message and file info and condition //! construct with message and file info and condition
...@@ -88,7 +90,7 @@ namespace aff { ...@@ -88,7 +90,7 @@ namespace aff {
void Exception::base_report() const void Exception::base_report() const
{ {
cerr << "Exception report:" << endl; cerr << "Exception report:" << endl;
if (Mmessage==NULL) if (Mmessage==0)
{ {
cerr << " No message" << endl; cerr << " No message" << endl;
} }
...@@ -96,11 +98,11 @@ namespace aff { ...@@ -96,11 +98,11 @@ namespace aff {
{ {
cerr << " message: " << Mmessage << endl; cerr << " message: " << Mmessage << endl;
} }
if (Mfile!=NULL) if (Mfile!=0)
{ {
cerr << " triggered in \"" << Mfile << "\" at line #" << Mline << endl; cerr << " triggered in \"" << Mfile << "\" at line #" << Mline << endl;
} }
if (Mcondition!=NULL) if (Mcondition!=0)
{ {
cerr << " by condition:" << endl cerr << " by condition:" << endl
<< " \"" << Mcondition << "\"" << endl; << " \"" << Mcondition << "\"" << endl;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: sharedheap_def.h,v 1.10 2002-12-29 00:09:06 forbrig Exp $ * $Id: sharedheap_def.h,v 1.11 2002-12-31 15:56:45 forbrig Exp $
* \author Thomas Forbriger * \author Thomas Forbriger
* \since 08/12/2002 * \since 08/12/2002
* *
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
* - 28/12/2002 V1.2 (thof) * - 28/12/2002 V1.2 (thof)
* - changed base class from specialization to * - changed base class from specialization to
* independent class template * independent class template
* - 31/12/2002 V1.3 (thof)
* - NULL is deprecated as pointed out by Wolfgang
* *
* ============================================================================ * ============================================================================
*/ */
...@@ -34,9 +36,9 @@ ...@@ -34,9 +36,9 @@
#ifndef AFF_SHAREDHEAP_DEF_H_VERSION #ifndef AFF_SHAREDHEAP_DEF_H_VERSION
#define AFF_SHAREDHEAP_DEF_H_VERSION \ #define AFF_SHAREDHEAP_DEF_H_VERSION \
"AFF_SHAREDHEAP_DEF_H V1.2" "AFF_SHAREDHEAP_DEF_H V1.3"
#define AFF_SHAREDHEAP_DEF_H_CVSID \ #define AFF_SHAREDHEAP_DEF_H_CVSID \
"$Id: sharedheap_def.h,v 1.10 2002-12-29 00:09:06 forbrig Exp $" "$Id: sharedheap_def.h,v 1.11 2002-12-31 15:56:45 forbrig Exp $"
namespace aff { namespace aff {
...@@ -58,7 +60,7 @@ namespace util { ...@@ -58,7 +60,7 @@ namespace util {
template <typename T> template <typename T>
inline inline
SHeap<T>::SHeap(const Tsize& size) SHeap<T>::SHeap(const Tsize& size)
: Mheap(NULL), Msize(size), Mnref(1), Mextern(false) : Mheap(0), Msize(size), Mnref(1), Mextern(false)
{ {
if (size>0) { if (size>0) {
try { Mheap=new T[size]; } try { Mheap=new T[size]; }
...@@ -85,7 +87,7 @@ namespace util { ...@@ -85,7 +87,7 @@ namespace util {
inline inline
SHeap<T>::~SHeap() SHeap<T>::~SHeap()
{ {
if ((Mheap!=NULL) && (Msize>0) && (!Mextern)) if ((Mheap!=0) && (Msize>0) && (!Mextern))
{ {
delete[] Mheap; delete[] Mheap;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment