Replace NULL by nullptr
This commit is contained in:
@@ -67,7 +67,7 @@ namespace Decimater {
|
||||
|
||||
template<class Mesh>
|
||||
BaseDecimaterT<Mesh>::BaseDecimaterT(Mesh& _mesh) :
|
||||
mesh_(_mesh), cmodule_(NULL), initialized_(false), observer_(NULL) {
|
||||
mesh_(_mesh), cmodule_(nullptr), initialized_(false), observer_(nullptr) {
|
||||
// default properties
|
||||
mesh_.request_vertex_status();
|
||||
mesh_.request_edge_status();
|
||||
@@ -249,8 +249,8 @@ bool BaseDecimaterT<Mesh>::initialize() {
|
||||
// priority module explicitly.
|
||||
|
||||
// find the priority module: either the only non-binary module in the list, or "Quadric"
|
||||
Module *quadric = NULL;
|
||||
Module *pmodule = NULL;
|
||||
Module *quadric = nullptr;
|
||||
Module *pmodule = nullptr;
|
||||
for (ModuleListIterator m_it = all_modules_.begin(), m_end =
|
||||
all_modules_.end(); m_it != m_end; ++m_it) {
|
||||
if ((*m_it)->name() == "Quadric")
|
||||
|
||||
@@ -75,7 +75,7 @@ DecimaterT<Mesh>::DecimaterT(Mesh& _mesh) :
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || __cplusplus > 199711L || defined( __GXX_EXPERIMENTAL_CXX0X__ )
|
||||
heap_(nullptr)
|
||||
#else
|
||||
heap_(NULL)
|
||||
heap_(nullptr)
|
||||
#endif
|
||||
|
||||
{
|
||||
|
||||
@@ -90,14 +90,14 @@ public:
|
||||
public:
|
||||
|
||||
/// Default constructor
|
||||
ModHandleT() : mod_(NULL) {}
|
||||
ModHandleT() : mod_(nullptr) {}
|
||||
|
||||
/// Destructor
|
||||
~ModHandleT() { /* don't delete mod_, since handle is not owner! */ }
|
||||
|
||||
/// Check handle status
|
||||
/// \return \c true, if handle is valid, else \c false.
|
||||
bool is_valid() const { return mod_ != NULL; }
|
||||
bool is_valid() const { return mod_ != nullptr; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -107,7 +107,7 @@ private:
|
||||
template <typename Mesh> friend class BaseDecimaterT;
|
||||
#endif
|
||||
|
||||
void clear() { mod_ = NULL; }
|
||||
void clear() { mod_ = nullptr; }
|
||||
void init(Module* _m) { mod_ = _m; }
|
||||
Module* module() { return mod_; }
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
|
||||
//
|
||||
oPropertyT( const std::string& _name = "<unknown>" )
|
||||
: BaseProperty(_name), data_(NULL)
|
||||
: BaseProperty(_name), data_(nullptr)
|
||||
{
|
||||
data_ = property_t::create();
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
/// Constructor
|
||||
explicit CompositeT(Mesh& _mesh)
|
||||
: subdiv_type_(0),
|
||||
subdiv_rule_(NULL), /*first_rule_(NULL), last_rule_(NULL),*/ mesh_(_mesh)
|
||||
subdiv_rule_(nullptr), /*first_rule_(nullptr), last_rule_(nullptr),*/ mesh_(_mesh)
|
||||
{ }
|
||||
|
||||
///
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
void cleanup(void)
|
||||
{
|
||||
subdiv_type_ = 0;
|
||||
subdiv_rule_ = NULL;
|
||||
subdiv_rule_ = nullptr;
|
||||
|
||||
std::for_each(rule_sequence_.begin(),
|
||||
rule_sequence_.end(), DeleteRule() );
|
||||
|
||||
@@ -96,8 +96,8 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
CompositeT(void) : parent_t(), p_mesh_(NULL) {}
|
||||
explicit CompositeT(MeshType& _mesh) : parent_t(_mesh), p_mesh_(NULL) {};
|
||||
CompositeT(void) : parent_t(), p_mesh_(nullptr) {}
|
||||
explicit CompositeT(MeshType& _mesh) : parent_t(_mesh), p_mesh_(nullptr) {};
|
||||
virtual ~CompositeT() { }
|
||||
|
||||
public: // inherited interface
|
||||
@@ -128,7 +128,7 @@ protected: // inherited interface
|
||||
#endif
|
||||
{
|
||||
assert( p_mesh_ == &_m );
|
||||
p_mesh_=NULL;
|
||||
p_mesh_=nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
|
||||
/// Constructor to be used with interface 1 (calls attach())
|
||||
/// \see operator()( MeshType&, size_t )
|
||||
explicit SubdividerT( MeshType &_m ) : attached_(NULL) { attach(_m); }
|
||||
explicit SubdividerT( MeshType &_m ) : attached_(nullptr) { attach(_m); }
|
||||
|
||||
//@}
|
||||
|
||||
@@ -157,7 +157,7 @@ public: /// \name Interface 2
|
||||
if ( attached_ )
|
||||
{
|
||||
cleanup( *attached_ );
|
||||
attached_ = NULL;
|
||||
attached_ = nullptr;
|
||||
}
|
||||
}
|
||||
//@}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
# define access _access
|
||||
# define ACCESS_OK 0
|
||||
# define PATH_SEP ";"
|
||||
# define MKTEMP_AND_CHECK_FAILED(name) (_mktemp(name) == NULL)
|
||||
# define MKTEMP_AND_CHECK_FAILED(name) (_mktemp(name) == nullptr)
|
||||
#else
|
||||
# define ACCESS_OK X_OK
|
||||
# define PATH_SEP ":"
|
||||
@@ -368,7 +368,7 @@ void Gnuplot::plot_x(vector<double> d, const string &title)
|
||||
//
|
||||
//open temporary files for output
|
||||
#ifdef WIN32
|
||||
if ( _mktemp(name) == NULL)
|
||||
if ( _mktemp(name) == nullptr)
|
||||
#else
|
||||
if ( mkstemp(name) == -1 )
|
||||
#endif
|
||||
|
||||
@@ -120,7 +120,7 @@ int kbhit(void)
|
||||
error += tcsetattr(0, TCSANOW, &Otty);
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = 100; /* insert at least a minimal delay */
|
||||
select(1, NULL, NULL, NULL, &tv);
|
||||
select(1, nullptr, nullptr, nullptr, &tv);
|
||||
}
|
||||
return (error == 0 ? cnt : -1 );
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace VDPM {
|
||||
|
||||
VHierarchyWindow::
|
||||
VHierarchyWindow() :
|
||||
vhierarchy_(NULL), buffer_(NULL),buffer_min_ (0), buffer_max_(0), current_pos_(0) , window_min_(0), window_max_(0), n_shift_(0)
|
||||
vhierarchy_(nullptr), buffer_(nullptr),buffer_min_ (0), buffer_max_(0), current_pos_(0) , window_min_(0), window_max_(0), n_shift_(0)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -81,7 +81,7 @@ VHierarchyWindow() :
|
||||
|
||||
VHierarchyWindow::
|
||||
VHierarchyWindow(VHierarchy &_vhierarchy) :
|
||||
vhierarchy_(&_vhierarchy),buffer_(NULL),buffer_min_ (0), buffer_max_(0), current_pos_(0) , window_min_(0), window_max_(0) ,n_shift_(0)
|
||||
vhierarchy_(&_vhierarchy),buffer_(nullptr),buffer_min_ (0), buffer_max_(0), current_pos_(0) , window_min_(0), window_max_(0) ,n_shift_(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ VHierarchyWindow(VHierarchy &_vhierarchy) :
|
||||
VHierarchyWindow::
|
||||
~VHierarchyWindow(void)
|
||||
{
|
||||
if (buffer_ != NULL)
|
||||
if (buffer_ != nullptr)
|
||||
free(buffer_);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ update_buffer(VHierarchyNodeHandle _node_handle)
|
||||
void
|
||||
VHierarchyWindow::init(VHierarchyNodeHandleContainer &_roots)
|
||||
{
|
||||
if (buffer_ != NULL)
|
||||
if (buffer_ != nullptr)
|
||||
free(buffer_);
|
||||
|
||||
buffer_min_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user