Commit b083f32a authored by Jan Möbius's avatar Jan Möbius

Replace NULL by nullptr

parent f1b31421
Pipeline #10647 passed with stage
in 73 minutes and 38 seconds
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
operator T () const { return val_; } operator T () const { return val_; }
// operator const T& () const { return val_; } // operator const T& () const { return val_; }
operator T* () const { return is_valid() ? &val_ : NULL; } operator T* () const { return is_valid() ? &val_ : nullptr; }
private: private:
......
...@@ -68,7 +68,7 @@ int main(int argc, char **argv) ...@@ -68,7 +68,7 @@ int main(int argc, char **argv)
if ( !QGLFormat::hasOpenGL() ) { if ( !QGLFormat::hasOpenGL() ) {
QString msg = "System has no OpenGL support!"; QString msg = "System has no OpenGL support!";
QMessageBox::critical( NULL, "OpenGL", msg + argv[1] ); QMessageBox::critical( nullptr, "OpenGL", msg + argv[1] );
return -1; return -1;
} }
...@@ -103,7 +103,7 @@ int main(int argc, char **argv) ...@@ -103,7 +103,7 @@ int main(int argc, char **argv)
QString msg = "Cannot read mesh from file:\n '"; QString msg = "Cannot read mesh from file:\n '";
msg += argv[optind]; msg += argv[optind];
msg += "'"; msg += "'";
QMessageBox::critical( NULL, w.windowTitle(), msg ); QMessageBox::critical( nullptr, w.windowTitle(), msg );
return 1; return 1;
} }
} }
...@@ -118,7 +118,7 @@ int main(int argc, char **argv) ...@@ -118,7 +118,7 @@ int main(int argc, char **argv)
msg += "- Mesh file didn't provide texture coordinates\n"; msg += "- Mesh file didn't provide texture coordinates\n";
msg += "- Texture file does not exist\n"; msg += "- Texture file does not exist\n";
msg += "- Texture file is not accessible.\n"; msg += "- Texture file is not accessible.\n";
QMessageBox::warning( NULL, w.windowTitle(), msg ); QMessageBox::warning( nullptr, w.windowTitle(), msg );
} }
} }
......
...@@ -63,7 +63,7 @@ MeshViewerWidget::MeshViewerWidget(QWidget* parent) : MeshViewerWidgetT<MyMesh> ...@@ -63,7 +63,7 @@ MeshViewerWidget::MeshViewerWidget(QWidget* parent) : MeshViewerWidgetT<MyMesh>
QString msg = "Cannot read mesh from file:\n '"; QString msg = "Cannot read mesh from file:\n '";
msg += fname; msg += fname;
msg += "'"; msg += "'";
QMessageBox::critical( NULL, windowTitle(), msg); QMessageBox::critical( nullptr, windowTitle(), msg);
} }
t.stop(); t.stop();
std::cout << "Loaded mesh in ~" << t.as_string() << std::endl; std::cout << "Loaded mesh in ~" << t.as_string() << std::endl;
...@@ -80,7 +80,7 @@ void MeshViewerWidget::open_texture_gui(QString fname) ...@@ -80,7 +80,7 @@ void MeshViewerWidget::open_texture_gui(QString fname)
msg += "- Mesh file didn't provide texture coordinates\n"; msg += "- Mesh file didn't provide texture coordinates\n";
msg += "- Texture file does not exist\n"; msg += "- Texture file does not exist\n";
msg += "- Texture file is not accessible.\n"; msg += "- Texture file is not accessible.\n";
QMessageBox::warning( NULL, windowTitle(), msg ); QMessageBox::warning( nullptr, windowTitle(), msg );
} }
} }
......
...@@ -87,7 +87,7 @@ using namespace OpenMesh::Subdivider; ...@@ -87,7 +87,7 @@ using namespace OpenMesh::Subdivider;
SubdivideWidget:: SubdivideWidget::
SubdivideWidget(QWidget* _parent, const char* _name) SubdivideWidget(QWidget* _parent, const char* _name)
: QWidget(_parent), : QWidget(_parent),
timer_(NULL), animate_step_(0), max_animate_steps_(4), msecs_(0) timer_(nullptr), animate_step_(0), max_animate_steps_(4), msecs_(0)
{ {
setWindowTitle( QString(_name) ); setWindowTitle( QString(_name) );
......
...@@ -60,7 +60,7 @@ int main(int argc, char **argv) ...@@ -60,7 +60,7 @@ int main(int argc, char **argv)
if ( !QGLFormat::hasOpenGL() ) { if ( !QGLFormat::hasOpenGL() ) {
QString msg = "System has no OpenGL support!"; QString msg = "System has no OpenGL support!";
QMessageBox::critical( NULL, "OpenGL", msg + argv[1], QMessageBox::Ok ); QMessageBox::critical( nullptr, "OpenGL", msg + argv[1], QMessageBox::Ok );
return -1; return -1;
} }
...@@ -77,7 +77,7 @@ int main(int argc, char **argv) ...@@ -77,7 +77,7 @@ int main(int argc, char **argv)
if ( ! w->open_mesh(argv[1]) ) if ( ! w->open_mesh(argv[1]) )
{ {
QString msg = "Cannot read mesh from file "; QString msg = "Cannot read mesh from file ";
QMessageBox::critical( NULL, argv[1], msg + argv[1], QMessageBox::Ok ); QMessageBox::critical( nullptr, argv[1], msg + argv[1], QMessageBox::Ok );
return -1; return -1;
} }
} }
......
...@@ -78,9 +78,9 @@ PRIVATE_NODE_TYPESYSTEM_SOURCE(_class_); \ ...@@ -78,9 +78,9 @@ PRIVATE_NODE_TYPESYSTEM_SOURCE(_class_); \
SO_NODE_SOURCE_TEMPLATE \ SO_NODE_SOURCE_TEMPLATE \
unsigned int _class_::classinstances = 0; \ unsigned int _class_::classinstances = 0; \
SO_NODE_SOURCE_TEMPLATE \ SO_NODE_SOURCE_TEMPLATE \
const SoFieldData ** _class_::parentFieldData = NULL; \ const SoFieldData ** _class_::parentFieldData = nullptr; \
SO_NODE_SOURCE_TEMPLATE \ SO_NODE_SOURCE_TEMPLATE \
SoFieldData * _class_::fieldData = NULL; \ SoFieldData * _class_::fieldData = nullptr; \
\ \
SO_NODE_SOURCE_TEMPLATE \ SO_NODE_SOURCE_TEMPLATE \
const SoFieldData ** \ const SoFieldData ** \
......
...@@ -78,7 +78,7 @@ int main(int argc, char **argv) ...@@ -78,7 +78,7 @@ int main(int argc, char **argv)
if ( !QGLFormat::hasOpenGL() ) { if ( !QGLFormat::hasOpenGL() ) {
QString msg = "System has no OpenGL support!"; QString msg = "System has no OpenGL support!";
QMessageBox::critical( NULL, "OpenGL", msg + argv[1], 0 ); QMessageBox::critical( nullptr, "OpenGL", msg + argv[1], 0 );
return -1; return -1;
} }
...@@ -115,7 +115,7 @@ int main(int argc, char **argv) ...@@ -115,7 +115,7 @@ int main(int argc, char **argv)
QString msg = "Cannot read mesh from file:\n '"; QString msg = "Cannot read mesh from file:\n '";
msg += argv[optind]; msg += argv[optind];
msg += "'"; msg += "'";
QMessageBox::critical( NULL, w->caption(), msg, 0 ); QMessageBox::critical( nullptr, w->caption(), msg, 0 );
return 1; return 1;
} }
} }
...@@ -130,7 +130,7 @@ int main(int argc, char **argv) ...@@ -130,7 +130,7 @@ int main(int argc, char **argv)
msg += "- Mesh file didn't provide texture coordinates\n"; msg += "- Mesh file didn't provide texture coordinates\n";
msg += "- Texture file does not exist\n"; msg += "- Texture file does not exist\n";
msg += "- Texture file is not accessible.\n"; msg += "- Texture file is not accessible.\n";
QMessageBox::warning( NULL, w->caption(), msg, 0 ); QMessageBox::warning( nullptr, w->caption(), msg, 0 );
} }
} }
......
...@@ -325,7 +325,7 @@ void mouse(int button, int state, int x, int y) ...@@ -325,7 +325,7 @@ void mouse(int button, int state, int x, int y)
{ {
g.mgr->mouseButtonRelease(button, x, y); g.mgr->mouseButtonRelease(button, x, y);
// if ( g.mode & FLYMODE ) // if ( g.mode & FLYMODE )
// glutIdleFunc(NULL); // glutIdleFunc(nullptr);
} }
else else
{ {
......
...@@ -64,7 +64,7 @@ set_vdpm(const char _vdpm_name[256]) ...@@ -64,7 +64,7 @@ set_vdpm(const char _vdpm_name[256])
} }
#endif #endif
vdpm_ = ((VDPMServerViewerWidget *) ((VDPMServerSocket *) parent())->parent())->get_vdpm(_vdpm_name); vdpm_ = ((VDPMServerViewerWidget *) ((VDPMServerSocket *) parent())->parent())->get_vdpm(_vdpm_name);
if (vdpm_ == NULL) if (vdpm_ == nullptr)
return false; return false;
vhierarchy_ = &vdpm_->vhierarchy(); vhierarchy_ = &vdpm_->vhierarchy();
......
...@@ -72,7 +72,7 @@ get_vdpm(const char _vdpm_name[256]) ...@@ -72,7 +72,7 @@ get_vdpm(const char _vdpm_name[256])
} }
} }
return NULL; return nullptr;
} }
void void
......
...@@ -64,7 +64,7 @@ set_vdpm(const char _vdpm_name[256]) ...@@ -64,7 +64,7 @@ set_vdpm(const char _vdpm_name[256])
} }
#endif #endif
vdpm_ = ((VDPMServerViewerWidget *) ((VDPMServerSocket *) parent())->parent())->get_vdpm(_vdpm_name); vdpm_ = ((VDPMServerViewerWidget *) ((VDPMServerSocket *) parent())->parent())->get_vdpm(_vdpm_name);
if (vdpm_ == NULL) if (vdpm_ == nullptr)
return false; return false;
vhierarchy_ = &vdpm_->vhierarchy(); vhierarchy_ = &vdpm_->vhierarchy();
......
...@@ -71,7 +71,7 @@ get_vdpm(const char _vdpm_name[256]) ...@@ -71,7 +71,7 @@ get_vdpm(const char _vdpm_name[256])
} }
} }
return NULL; return nullptr;
} }
void void
......
...@@ -258,7 +258,7 @@ find_writer(const std::string& _format) ...@@ -258,7 +258,7 @@ find_writer(const std::string& _format)
if ((*it)->can_u_write(filename)) if ((*it)->can_u_write(filename))
return *it; return *it;
return NULL; return nullptr;
} }
......
...@@ -135,7 +135,7 @@ namespace OMFormat { ...@@ -135,7 +135,7 @@ namespace OMFormat {
default: default:
std::clog << "as_string(Chunk::Entity): Invalid value!"; std::clog << "as_string(Chunk::Entity): Invalid value!";
} }
return NULL; return nullptr;
} }
...@@ -153,7 +153,7 @@ namespace OMFormat { ...@@ -153,7 +153,7 @@ namespace OMFormat {
case Chunk::Type_Custom: return "Custom"; case Chunk::Type_Custom: return "Custom";
case Chunk::Type_Topology: return "Topology"; case Chunk::Type_Topology: return "Topology";
} }
return NULL; return nullptr;
} }
...@@ -172,7 +172,7 @@ namespace OMFormat { ...@@ -172,7 +172,7 @@ namespace OMFormat {
case Chunk::Dim_7D: return "7D"; case Chunk::Dim_7D: return "7D";
case Chunk::Dim_8D: return "8D"; case Chunk::Dim_8D: return "8D";
} }
return NULL; return nullptr;
} }
...@@ -187,7 +187,7 @@ namespace OMFormat { ...@@ -187,7 +187,7 @@ namespace OMFormat {
case Chunk::Integer_32 : return "32"; case Chunk::Integer_32 : return "32";
case Chunk::Integer_64 : return "64"; case Chunk::Integer_64 : return "64";
} }
return NULL; return nullptr;
} }
const char *as_string(Chunk::Float_Size d) const char *as_string(Chunk::Float_Size d)
...@@ -198,7 +198,7 @@ namespace OMFormat { ...@@ -198,7 +198,7 @@ namespace OMFormat {
case Chunk::Float_64 : return "64"; case Chunk::Float_64 : return "64";
case Chunk::Float_128: return "128"; case Chunk::Float_128: return "128";
} }
return NULL; return nullptr;
} }
......
...@@ -144,7 +144,7 @@ public: ...@@ -144,7 +144,7 @@ public:
virtual OpenMesh::Attributes::StatusInfo status(HalfedgeHandle _heh) const = 0; virtual OpenMesh::Attributes::StatusInfo status(HalfedgeHandle _heh) const = 0;
// get reference to base kernel // get reference to base kernel
virtual const BaseKernel* kernel() { return 0; } virtual const BaseKernel* kernel() { return nullptr; }
// query number of faces, vertices, normals, texcoords // query number of faces, vertices, normals, texcoords
......
...@@ -196,7 +196,7 @@ public: ...@@ -196,7 +196,7 @@ public:
virtual void add_texture_information( int _id , std::string _name ) = 0; virtual void add_texture_information( int _id , std::string _name ) = 0;
// get reference to base kernel // get reference to base kernel
virtual BaseKernel* kernel() { return 0; } virtual BaseKernel* kernel() { return nullptr; }
virtual bool is_triangle_mesh() const { return false; } virtual bool is_triangle_mesh() const { return false; }
......
...@@ -64,27 +64,27 @@ void BaseKernel::property_stats(std::ostream& _ostr) const ...@@ -64,27 +64,27 @@ void BaseKernel::property_stats(std::ostream& _ostr) const
_ostr << vprops_.size() << " vprops:\n"; _ostr << vprops_.size() << " vprops:\n";
for (it=vps.begin(); it!=vps.end(); ++it) for (it=vps.begin(); it!=vps.end(); ++it)
{ {
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
_ostr << hprops_.size() << " hprops:\n"; _ostr << hprops_.size() << " hprops:\n";
for (it=hps.begin(); it!=hps.end(); ++it) for (it=hps.begin(); it!=hps.end(); ++it)
{ {
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
_ostr << eprops_.size() << " eprops:\n"; _ostr << eprops_.size() << " eprops:\n";
for (it=eps.begin(); it!=eps.end(); ++it) for (it=eps.begin(); it!=eps.end(); ++it)
{ {
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
_ostr << fprops_.size() << " fprops:\n"; _ostr << fprops_.size() << " fprops:\n";
for (it=fps.begin(); it!=fps.end(); ++it) for (it=fps.begin(); it!=fps.end(); ++it)
{ {
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
_ostr << mprops_.size() << " mprops:\n"; _ostr << mprops_.size() << " mprops:\n";
for (it=mps.begin(); it!=mps.end(); ++it) for (it=mps.begin(); it!=mps.end(); ++it)
{ {
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
} }
...@@ -97,7 +97,7 @@ void BaseKernel::vprop_stats( std::string& _string ) const ...@@ -97,7 +97,7 @@ void BaseKernel::vprop_stats( std::string& _string ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& vps = vprops_.properties(); const PropertyContainer::Properties& vps = vprops_.properties();
for (it=vps.begin(); it!=vps.end(); ++it) for (it=vps.begin(); it!=vps.end(); ++it)
if ( *it == NULL ) if ( *it == nullptr )
_string += "[deleted] \n"; _string += "[deleted] \n";
else { else {
_string += (*it)->name(); _string += (*it)->name();
...@@ -113,7 +113,7 @@ void BaseKernel::hprop_stats( std::string& _string ) const ...@@ -113,7 +113,7 @@ void BaseKernel::hprop_stats( std::string& _string ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& hps = hprops_.properties(); const PropertyContainer::Properties& hps = hprops_.properties();
for (it=hps.begin(); it!=hps.end(); ++it) for (it=hps.begin(); it!=hps.end(); ++it)
if ( *it == NULL ) if ( *it == nullptr )
_string += "[deleted] \n"; _string += "[deleted] \n";
else { else {
_string += (*it)->name(); _string += (*it)->name();
...@@ -129,7 +129,7 @@ void BaseKernel::eprop_stats( std::string& _string ) const ...@@ -129,7 +129,7 @@ void BaseKernel::eprop_stats( std::string& _string ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& eps = eprops_.properties(); const PropertyContainer::Properties& eps = eprops_.properties();
for (it=eps.begin(); it!=eps.end(); ++it) for (it=eps.begin(); it!=eps.end(); ++it)
if ( *it == NULL ) if ( *it == nullptr )
_string += "[deleted] \n"; _string += "[deleted] \n";
else { else {
_string += (*it)->name(); _string += (*it)->name();
...@@ -144,7 +144,7 @@ void BaseKernel::fprop_stats( std::string& _string ) const ...@@ -144,7 +144,7 @@ void BaseKernel::fprop_stats( std::string& _string ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& fps = fprops_.properties(); const PropertyContainer::Properties& fps = fprops_.properties();
for (it=fps.begin(); it!=fps.end(); ++it) for (it=fps.begin(); it!=fps.end(); ++it)
if ( *it == NULL ) if ( *it == nullptr )
_string += "[deleted] \n"; _string += "[deleted] \n";
else { else {
_string += (*it)->name(); _string += (*it)->name();
...@@ -160,7 +160,7 @@ void BaseKernel::mprop_stats( std::string& _string ) const ...@@ -160,7 +160,7 @@ void BaseKernel::mprop_stats( std::string& _string ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& mps = mprops_.properties(); const PropertyContainer::Properties& mps = mprops_.properties();
for (it=mps.begin(); it!=mps.end(); ++it) for (it=mps.begin(); it!=mps.end(); ++it)
if ( *it == NULL ) if ( *it == nullptr )
_string += "[deleted] \n"; _string += "[deleted] \n";
else { else {
_string += (*it)->name(); _string += (*it)->name();
...@@ -178,7 +178,7 @@ void BaseKernel::vprop_stats(std::ostream& _ostr ) const ...@@ -178,7 +178,7 @@ void BaseKernel::vprop_stats(std::ostream& _ostr ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& vps = vprops_.properties(); const PropertyContainer::Properties& vps = vprops_.properties();
for (it=vps.begin(); it!=vps.end(); ++it) for (it=vps.begin(); it!=vps.end(); ++it)
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
void BaseKernel::hprop_stats() const void BaseKernel::hprop_stats() const
...@@ -190,7 +190,7 @@ void BaseKernel::hprop_stats(std::ostream& _ostr ) const ...@@ -190,7 +190,7 @@ void BaseKernel::hprop_stats(std::ostream& _ostr ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& hps = hprops_.properties(); const PropertyContainer::Properties& hps = hprops_.properties();
for (it=hps.begin(); it!=hps.end(); ++it) for (it=hps.begin(); it!=hps.end(); ++it)
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
void BaseKernel::eprop_stats() const void BaseKernel::eprop_stats() const
...@@ -202,7 +202,7 @@ void BaseKernel::eprop_stats(std::ostream& _ostr ) const ...@@ -202,7 +202,7 @@ void BaseKernel::eprop_stats(std::ostream& _ostr ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& eps = eprops_.properties(); const PropertyContainer::Properties& eps = eprops_.properties();
for (it=eps.begin(); it!=eps.end(); ++it) for (it=eps.begin(); it!=eps.end(); ++it)
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
void BaseKernel::fprop_stats() const void BaseKernel::fprop_stats() const
...@@ -214,7 +214,7 @@ void BaseKernel::fprop_stats(std::ostream& _ostr ) const ...@@ -214,7 +214,7 @@ void BaseKernel::fprop_stats(std::ostream& _ostr ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& fps = fprops_.properties(); const PropertyContainer::Properties& fps = fprops_.properties();
for (it=fps.begin(); it!=fps.end(); ++it) for (it=fps.begin(); it!=fps.end(); ++it)
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
void BaseKernel::mprop_stats() const void BaseKernel::mprop_stats() const
...@@ -226,7 +226,7 @@ void BaseKernel::mprop_stats(std::ostream& _ostr ) const ...@@ -226,7 +226,7 @@ void BaseKernel::mprop_stats(std::ostream& _ostr ) const
PropertyContainer::Properties::const_iterator it; PropertyContainer::Properties::const_iterator it;
const PropertyContainer::Properties& mps = mprops_.properties(); const PropertyContainer::Properties& mps = mprops_.properties();
for (it=mps.begin(); it!=mps.end(); ++it) for (it=mps.begin(); it!=mps.end(); ++it)
*it == NULL ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr); *it == nullptr ? (void)(_ostr << "[deleted]" << "\n") : (*it)->stats(_ostr);
} }
......
...@@ -285,7 +285,7 @@ class mostream : public std::ostream ...@@ -285,7 +285,7 @@ class mostream : public std::ostream
public: public:
/// Explicit constructor /// Explicit constructor
explicit mostream() : std::ostream(NULL) { init(&streambuffer_); } explicit mostream() : std::ostream(nullptr) { init(&streambuffer_); }
/// Connect target to multiplexer /// Connect target to multiplexer
......
...@@ -70,7 +70,7 @@ protected: ...@@ -70,7 +70,7 @@ protected:
public: public:
AutoPropertyHandleT() AutoPropertyHandleT()
: m_(NULL), own_property_(false) : m_(nullptr), own_property_(false)
{} {}
AutoPropertyHandleT(const Self& _other) AutoPropertyHandleT(const Self& _other)
......
...@@ -434,7 +434,7 @@ public: ...@@ -434,7 +434,7 @@ public:
const value_type* data() const { const value_type* data() const {
if( data_.empty() ) if( data_.empty() )
return 0; return nullptr;
return (value_type*) &data_[0]; return (value_type*) &data_[0];
} }
......
...@@ -102,8 +102,8 @@ public: ...@@ -102,8 +102,8 @@ public:
{ {
Properties::iterator p_it=properties_.begin(), p_end=properties_.end(); Properties::iterator p_it=properties_.begin(), p_end=properties_.end();
int idx=0; int idx=0;
for ( ; p_it!=p_end && *p_it!=NULL; ++p_it, ++idx ) {}; for ( ; p_it!=p_end && *p_it!=nullptr; ++p_it, ++idx ) {};
if (p_it==p_end) properties_.push_back(NULL); if (p_it==p_end) properties_.push_back(nullptr);
properties_[idx] = new PropertyT<T>(_name); properties_[idx] = new PropertyT<T>(_name);
return BasePropHandleT<T>(idx); return BasePropHandleT<T>(idx);
} }
...@@ -115,11 +115,11 @@ public: ...@@ -115,11 +115,11 @@ public:
Properties::const_iterator p_it = properties_.begin(); Properties::const_iterator p_it = properties_.begin();
for (int idx=0; p_it != properties_.end(); ++p_it, ++idx) for (int idx=0; p_it != properties_.end(); ++p_it, ++idx)
{ {
if (*p_it != NULL && if (*p_it != nullptr &&
(*p_it)->name() == _name //skip deleted properties (*p_it)->name() == _name //skip deleted properties
// Skip type check // Skip type check
#ifndef OM_FORCE_STATIC_CAST #ifndef OM_FORCE_STATIC_CAST
&& dynamic_cast<PropertyT<T>*>(properties_[idx]) != NULL //check type && dynamic_cast<PropertyT<T>*>(properties_[idx]) != nullptr //check type
#endif #endif
) )
{ {
...@@ -134,23 +134,23 @@ public: ...@@ -134,23 +134,23 @@ public:
Properties::const_iterator p_it = properties_.begin(); Properties::const_iterator p_it = properties_.begin();
for (int idx=0; p_it != properties_.end(); ++p_it, ++idx) for (int idx=0; p_it != properties_.end(); ++p_it, ++idx)
{ {
if (*p_it != NULL && (*p_it)->name() == _name) //skip deleted properties if (*p_it != nullptr && (*p_it)->name() == _name) //skip deleted properties
{ {
return *p_it; return *p_it;
} }