Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global: change null to nullptr #1176

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions libs/alglib/src/alglibmisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ Initialized with HQRNDRandomize() or HQRNDSeed().
*************************************************************************/
_hqrndstate_owner::_hqrndstate_owner()
{
p_struct = (alglib_impl::hqrndstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::hqrndstate), NULL);
if( p_struct==NULL )
p_struct = (alglib_impl::hqrndstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::hqrndstate), nullptr);
if( p_struct==nullptr )
throw ap_error("ALGLIB: malloc error");
if( !alglib_impl::_hqrndstate_init(p_struct, NULL, ae_false) )
if( !alglib_impl::_hqrndstate_init(p_struct, nullptr, ae_false) )
throw ap_error("ALGLIB: malloc error");
}

_hqrndstate_owner::_hqrndstate_owner(const _hqrndstate_owner &rhs)
{
p_struct = (alglib_impl::hqrndstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::hqrndstate), NULL);
if( p_struct==NULL )
p_struct = (alglib_impl::hqrndstate*)alglib_impl::ae_malloc(sizeof(alglib_impl::hqrndstate), nullptr);
if( p_struct==nullptr )
throw ap_error("ALGLIB: malloc error");
if( !alglib_impl::_hqrndstate_init_copy(p_struct, const_cast<alglib_impl::hqrndstate*>(rhs.p_struct), NULL, ae_false) )
if( !alglib_impl::_hqrndstate_init_copy(p_struct, const_cast<alglib_impl::hqrndstate*>(rhs.p_struct), nullptr, ae_false) )
throw ap_error("ALGLIB: malloc error");
}

Expand All @@ -70,7 +70,7 @@ _hqrndstate_owner& _hqrndstate_owner::operator=(const _hqrndstate_owner &rhs)
if( this==&rhs )
return *this;
alglib_impl::_hqrndstate_clear(p_struct);
if( !alglib_impl::_hqrndstate_init_copy(p_struct, const_cast<alglib_impl::hqrndstate*>(rhs.p_struct), NULL, ae_false) )
if( !alglib_impl::_hqrndstate_init_copy(p_struct, const_cast<alglib_impl::hqrndstate*>(rhs.p_struct), nullptr, ae_false) )
throw ap_error("ALGLIB: malloc error");
return *this;
}
Expand Down Expand Up @@ -382,19 +382,19 @@ double hqrndcontinuous(const hqrndstate &state, const real_1d_array &x, const ae
*************************************************************************/
_kdtree_owner::_kdtree_owner()
{
p_struct = (alglib_impl::kdtree*)alglib_impl::ae_malloc(sizeof(alglib_impl::kdtree), NULL);
if( p_struct==NULL )
p_struct = (alglib_impl::kdtree*)alglib_impl::ae_malloc(sizeof(alglib_impl::kdtree), nullptr);
if( p_struct==nullptr )
throw ap_error("ALGLIB: malloc error");
if( !alglib_impl::_kdtree_init(p_struct, NULL, ae_false) )
if( !alglib_impl::_kdtree_init(p_struct, nullptr, ae_false) )
throw ap_error("ALGLIB: malloc error");
}

_kdtree_owner::_kdtree_owner(const _kdtree_owner &rhs)
{
p_struct = (alglib_impl::kdtree*)alglib_impl::ae_malloc(sizeof(alglib_impl::kdtree), NULL);
if( p_struct==NULL )
p_struct = (alglib_impl::kdtree*)alglib_impl::ae_malloc(sizeof(alglib_impl::kdtree), nullptr);
if( p_struct==nullptr )
throw ap_error("ALGLIB: malloc error");
if( !alglib_impl::_kdtree_init_copy(p_struct, const_cast<alglib_impl::kdtree*>(rhs.p_struct), NULL, ae_false) )
if( !alglib_impl::_kdtree_init_copy(p_struct, const_cast<alglib_impl::kdtree*>(rhs.p_struct), nullptr, ae_false) )
throw ap_error("ALGLIB: malloc error");
}

Expand All @@ -403,7 +403,7 @@ _kdtree_owner& _kdtree_owner::operator=(const _kdtree_owner &rhs)
if( this==&rhs )
return *this;
alglib_impl::_kdtree_clear(p_struct);
if( !alglib_impl::_kdtree_init_copy(p_struct, const_cast<alglib_impl::kdtree*>(rhs.p_struct), NULL, ae_false) )
if( !alglib_impl::_kdtree_init_copy(p_struct, const_cast<alglib_impl::kdtree*>(rhs.p_struct), nullptr, ae_false) )
throw ap_error("ALGLIB: malloc error");
return *this;
}
Expand Down
Loading