newer standards prefer nullptr over NULL - this is most of them but there are others too

This commit is contained in:
DarthArgus
2016-02-11 15:16:14 -06:00
parent a7f2d0ea6a
commit 3e4cc36e7e
937 changed files with 14983 additions and 14983 deletions
@@ -22,9 +22,9 @@ using namespace DB;
BindableVarray::BindableVarray() :
m_initialized(false),
m_tdo (NULL),
m_data (NULL),
m_session (NULL)
m_tdo (nullptr),
m_data (nullptr),
m_session (nullptr)
{
}
@@ -52,7 +52,7 @@ bool BindableVarray::create(DB::Session *session, const std::string &name, const
schema.length(),
reinterpret_cast<OraText*>(const_cast<char*>(name.c_str())),
name.length(),
NULL,
nullptr,
0,
OCI_DURATION_SESSION,
OCI_TYPEGET_HEADER,
@@ -64,7 +64,7 @@ bool BindableVarray::create(DB::Session *session, const std::string &name, const
localSession->errhp,
localSession->svchp,
OCI_TYPECODE_VARRAY,
m_tdo, NULL,
m_tdo, nullptr,
OCI_DURATION_DEFAULT,
true,
reinterpret_cast<void**>(&m_data)))))
@@ -86,9 +86,9 @@ void BindableVarray::free()
OCIObjectFree (localSession->envhp,
localSession->errhp, m_data, 0)));
m_initialized = false;
m_tdo=NULL;
m_data=NULL;
m_session=NULL;
m_tdo=nullptr;
m_data=nullptr;
m_session=nullptr;
}
// ----------------------------------------------------------------------
@@ -354,7 +354,7 @@ std::string BindableVarrayNumber::outputValue() const
if (exists)
{
if (*indicator == OCI_IND_NULL)
result += "NULL";
result += "nullptr";
else
{
double value;
@@ -400,7 +400,7 @@ bool BindableVarrayString::push_back(const Unicode::String &value)
bool BindableVarrayString::push_back(const std::string &value)
{
OCIString *buffer = NULL;
OCIString *buffer = nullptr;
OCIInd buffer_indicator (OCI_IND_NOTNULL);
OCISession *localSession = safe_cast<OCISession*>(m_session);
@@ -437,7 +437,7 @@ bool BindableVarrayString::push_back(bool bvalue)
else
value = "N";
OCIString *buffer = NULL;
OCIString *buffer = nullptr;
OCIInd buffer_indicator (OCI_IND_NOTNULL);
OCISession *localSession = safe_cast<OCISession*>(m_session);
@@ -469,7 +469,7 @@ bool BindableVarrayString::push_back(bool IsNULL, const Unicode::String &value)
bool BindableVarrayString::push_back(bool IsNULL, const std::string &value)
{
OCIString *buffer = NULL;
OCIString *buffer = nullptr;
OCIInd buffer_indicator;
if ( IsNULL )
{
@@ -515,7 +515,7 @@ bool BindableVarrayString::push_back(bool IsNULL, bool bvalue)
else
value = "N";
OCIString *buffer = NULL;
OCIString *buffer = nullptr;
OCIInd buffer_indicator;
if ( IsNULL )
{
@@ -568,14 +568,14 @@ std::string BindableVarrayString::outputValue() const
if (exists)
{
if (*indicator == OCI_IND_NULL)
result += "NULL";
result += "nullptr";
else
{
OraText * text = OCIStringPtr(localSession->envhp, *element);
if (text)
result += '"' + std::string(reinterpret_cast<char*>(text)) + '"';
else
result += "NULL";
result += "nullptr";
}
}
else
@@ -49,13 +49,13 @@ bool DB::OCIQueryImpl::setup(Session *session)
{
// setSession(session);
DEBUG_FATAL(m_session!=0,("m_session was not NULL"));
DEBUG_FATAL(m_server!=0,("m_server was not NULL"));
DEBUG_FATAL(m_session!=0,("m_session was not nullptr"));
DEBUG_FATAL(m_server!=0,("m_server was not nullptr"));
DEBUG_FATAL(m_stmthp!=0,("m_stmthp was not 0"));
DEBUG_FATAL(m_cursorhp!=0,("m_cursorhp was not 0"));
m_session=dynamic_cast<DB::OCISession*>(session);
FATAL((m_session==0),("Must pass a non-NULL OCISession to setup()."));
FATAL((m_session==0),("Must pass a non-nullptr OCISession to setup()."));
m_server=m_session->m_server;
NOT_NULL(m_server);
@@ -180,7 +180,7 @@ bool DB::OCIQueryImpl::exec()
m_session->setOkToFetch();
m_session->setLastQueryStatement(m_sql);
sword status=OCIStmtExecute(m_session->svchp, m_stmthp, m_session->errhp, 1, 0,
NULL, NULL, OCI_DEFAULT);
nullptr, nullptr, OCI_DEFAULT);
if (status == OCI_NO_DATA)
{
@@ -393,8 +393,8 @@ DB::OCIQueryImpl::BindRec::BindRec(size_t numElements) :
length(0),
stringAdjust(false),
m_numElements(numElements),
m_indicatorArray(NULL),
m_lengthArray(NULL)
m_indicatorArray(nullptr),
m_lengthArray(nullptr)
{
// This is ugly, but it avoids having to create two different kinds of bindrecs that inherit from an abstract base class
if (m_numElements > 1)
@@ -714,11 +714,11 @@ bool DB::OCIQueryImpl::bindParameter(BindableVarray &buffer)
&(br->bindp),
m_session->errhp,
nextParameter++,
NULL,
nullptr,
0,
SQLT_NTY,
NULL,
NULL,
nullptr,
nullptr,
0,
0,
0,
@@ -63,7 +63,7 @@ bool DB::OCIServer::checkerr(OCISession const & session, int status)
text errbuf[512];
sb4 errcode = 0;
OCIErrorGet((dvoid *)(session.errhp), (ub4) 1, (text *) NULL, &errcode,
OCIErrorGet((dvoid *)(session.errhp), (ub4) 1, (text *) nullptr, &errcode,
errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
WARNING(true,("Database error: %.*s",512,errbuf));
@@ -56,11 +56,11 @@ static void freeHook(dvoid *, dvoid *memptr)
DB::OCISession::OCISession(DB::OCIServer *server) :
m_server(server),
envhp(NULL),
errhp(NULL),
srvhp(NULL),
sesp(NULL),
svchp(NULL),
envhp(nullptr),
errhp(nullptr),
srvhp(nullptr),
sesp(nullptr),
svchp(nullptr),
autoCommitMode(true),
m_resetTime(server->getReconnectTime()==0 ? 0 : time(0) + server->getReconnectTime()),
m_okToFetch(true)
@@ -235,11 +235,11 @@ bool DB::OCISession::disconnect()
success = false;
}
svchp = NULL;
sesp = NULL;
srvhp = NULL;
errhp = NULL;
envhp = NULL;
svchp = nullptr;
sesp = nullptr;
srvhp = nullptr;
errhp = nullptr;
envhp = nullptr;
connectLock.leave();
return success;