diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:17:21 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:29 +0100 |
commit | a96b564aeeea6cd27d68084327d11be615ebc0a8 (patch) | |
tree | 122c691378f9a14c4c06dd5618e13a5b73d92226 /idlc/source/idlc.cxx | |
parent | 85552d865b8dcd059b0eb33c42c8a491f88402e3 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: Ic42387288c96436915956ede2eb510b9c3fbc49b
Diffstat (limited to 'idlc/source/idlc.cxx')
-rw-r--r-- | idlc/source/idlc.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index 94d152501a01..97fe49a2a1bc 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -42,7 +42,7 @@ AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope) { - if (pScope == NULL) return NULL; + if (pScope == nullptr) return nullptr; switch( pScope->getScopeNodeType() ) { @@ -65,13 +65,13 @@ AstDeclaration* SAL_CALL scopeAsDecl(AstScope* pScope) case NT_enum: return static_cast<AstEnum*>(pScope); default: - return NULL; + return nullptr; } } AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl) { - if (pDecl == NULL) return NULL; + if (pDecl == nullptr) return nullptr; switch(pDecl->getNodeType()) { @@ -94,7 +94,7 @@ AstScope* SAL_CALL declAsScope(AstDeclaration* pDecl) case NT_operation: return static_cast<AstOperation*>(pDecl); default: - return NULL; + return nullptr; } } @@ -120,7 +120,7 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot) pParentScope = pModule; // define XInterface - AstInterface* pInterface = new AstInterface(OString("XInterface"), NULL, pParentScope); + AstInterface* pInterface = new AstInterface(OString("XInterface"), nullptr, pParentScope); pInterface->setDefined(); pInterface->setPredefined(true); pInterface->setPublished(); @@ -211,7 +211,7 @@ Idlc::Idlc(Options* pOptions) { m_pScopes = new AstStack(); // init root object after construction - m_pRoot = NULL; + m_pRoot = nullptr; m_pErrorHandler = new ErrorHandler(); m_bGenerateDoc = m_pOptions->isValid("-C"); } @@ -226,7 +226,7 @@ Idlc::~Idlc() void Idlc::init() { delete m_pRoot; - m_pRoot = new AstModule(NT_root, OString(), NULL); + m_pRoot = new AstModule(NT_root, OString(), nullptr); // push the root node on the stack m_pScopes->push(m_pRoot); @@ -253,7 +253,7 @@ void Idlc::reset() m_pScopes->clear(); delete m_pRoot; - m_pRoot = new AstModule(NT_root, OString(), NULL); + m_pRoot = new AstModule(NT_root, OString(), nullptr); // push the root node on the stack m_pScopes->push(m_pRoot); @@ -348,7 +348,7 @@ Idlc::dumpDeps(OString const& rDepFile, OString const& rTarget) return ::osl::FileBase::E_None == rc; } -static Idlc* pStaticIdlc = NULL; +static Idlc* pStaticIdlc = nullptr; Idlc* SAL_CALL idlc() { @@ -364,7 +364,7 @@ Idlc* SAL_CALL setIdlc(Options* pOptions) } AstDeclaration const * resolveTypedefs(AstDeclaration const * type) { - if (type != 0) { + if (type != nullptr) { while (type->getNodeType() == NT_typedef) { type = static_cast< AstTypeDef const * >(type)->getBaseType(); } @@ -377,8 +377,8 @@ AstDeclaration const * deconstructAndResolveTypedefs( { *rank = 0; for (;;) { - if (type == 0) { - return 0; + if (type == nullptr) { + return nullptr; } switch (type->getNodeType()) { case NT_typedef: |