diff --git a/pub/lib/curve.cpp b/pub/lib/curve.cpp index a0725743a15546fd6d0cc92ab742b2aa5f79940e..ff9433e0961156be493b5950c4ca71258e148554 100644 --- a/pub/lib/curve.cpp +++ b/pub/lib/curve.cpp @@ -210,7 +210,7 @@ void NCurveFile::change_range() fc->range_expr = expr; fc->lDoc.push_back( "cr " + expr ); if( expr=="" ) { - fc->range_T = RNode(); + fc->range_T = nullptr; continue; } fc->range_T = user_xaxparse( expr.c_str() ); diff --git a/pub/lib/expr.hpp b/pub/lib/expr.hpp index 86a4fb76b85c7d54cbc56193f07eb3d7107ae094..3c19f9ee88d6bb27fe402ee1fa158eaf4fd53f23 100644 --- a/pub/lib/expr.hpp +++ b/pub/lib/expr.hpp @@ -34,7 +34,7 @@ class CContext { class CRef1 { public: RNode tk; //!< A node yielding the workspace index k. - CRef1( RNode _tk=RNode() ) : tk(_tk) {} + CRef1( RNode _tk=nullptr ) : tk(_tk) {} int get_k( const CContext& ctx ) const; bool k_depends_on_i() const; virtual string ref_info() const; @@ -46,7 +46,7 @@ class CRef1 { class CRef2 : public CRef1 { public: RNode tj; //!< A node yielding the spectrum index j. - CRef2( RNode _tk=RNode(), RNode _tj=RNode() ) : CRef1(_tk), tj(_tj) {} + CRef2( RNode _tk=nullptr, RNode _tj=nullptr ) : CRef1(_tk), tj(_tj) {} int get_j( const CContext& ctx, int nj ) const; bool j_depends_on_i() const; virtual string ref_info() const; @@ -58,7 +58,7 @@ class CRef2 : public CRef1 { class CRef3 : public CRef2 { public: RNode ti; //!< A node yielding the point index i. - CRef3( RNode _tk=RNode(), RNode _tj=RNode(), RNode _ti=RNode() ) : CRef2(_tk,_tj), ti(_ti) {} + CRef3( RNode _tk=nullptr, RNode _tj=nullptr, RNode _ti=nullptr ) : CRef2(_tk,_tj), ti(_ti) {} virtual string ref_info() const; }; diff --git a/pub/lib/node.hpp b/pub/lib/node.hpp index e8dc2e00601b1aab572eb9259e3f48c400209316..9ae1e78da22c0eae60458b08a729c2707e5ea9f7 100644 --- a/pub/lib/node.hpp +++ b/pub/lib/node.hpp @@ -76,7 +76,7 @@ class CNodeRange: public CNodeWithArgs { private: bool inclusive_end; public: - CNodeRange( bool _inclusive_end, RNode _beg=RNode(), RNode _end=RNode(), RNode _step=RNode() ) + CNodeRange( bool _inclusive_end, RNode _beg=nullptr, RNode _end=nullptr, RNode _step=nullptr ) : CNodeWithArgs(3), inclusive_end(_inclusive_end) { arg[0] = _beg; arg[1] = _end; arg[2] = _step; }; RObj tree_val( const CContext& ctx ) const; diff --git a/pub/lib/xax_yacc.ypp b/pub/lib/xax_yacc.ypp index 28b3376cd5e981d31b13fb9dd149364260a35dc6..0b4ce954c9712f4f39451314c90104452e2e90c2 100644 --- a/pub/lib/xax_yacc.ypp +++ b/pub/lib/xax_yacc.ypp @@ -90,14 +90,14 @@ list: range: exp { $$.t = $1.t; } | ':' { $$.t = RNode( new CNodeRange( true ) ); } - | ':' exp { $$.t = RNode( new CNodeRange( true, RNode(), $2.t ) ); } + | ':' exp { $$.t = RNode( new CNodeRange( true, nullptr, $2.t ) ); } | exp ':' { $$.t = RNode( new CNodeRange( true, $1.t ) ); } | exp ':' exp { $$.t = RNode( new CNodeRange( true, $1.t, $3.t ) ); } | exp BOP_BLW exp { $$.t = RNode( new CNodeRange( false, $1.t, $3.t ) ); } - | ':' ':' exp { $$.t = RNode( new CNodeRange( true, RNode(), RNode(), $3.t ) ); } - | exp ':' ':' exp { $$.t = RNode( new CNodeRange( true, $1.t, RNode(), $4.t ) ); } - | ':' exp ':' exp { $$.t = RNode( new CNodeRange( true, RNode(), $2.t, $4.t ) ); } - | BOP_BLW exp ':' exp { $$.t = RNode( new CNodeRange( false, RNode(), $2.t, $4.t ) ); } + | ':' ':' exp { $$.t = RNode( new CNodeRange( true, nullptr, nullptr, $3.t ) ); } + | exp ':' ':' exp { $$.t = RNode( new CNodeRange( true, $1.t, nullptr, $4.t ) ); } + | ':' exp ':' exp { $$.t = RNode( new CNodeRange( true, nullptr, $2.t, $4.t ) ); } + | BOP_BLW exp ':' exp { $$.t = RNode( new CNodeRange( false, nullptr, $2.t, $4.t ) ); } | exp ':' exp ':' exp { $$.t = RNode( new CNodeRange( true, $1.t, $3.t, $5.t ) ); } | exp BOP_BLW exp ':' exp { $$.t = RNode( new CNodeRange( false, $1.t, $3.t, $5.t ) ); } @@ -184,7 +184,7 @@ bra3: /* optional bracket with up to three indices */ ; ind: /* optional index */ - /* empty */ { $$.t = RNode();} + /* empty */ { $$.t = nullptr;} | exp { $$.t = $1.t; } ;