Kaydet (Commit) eb9b890b authored tarafından Caolán McNamara's avatar Caolán McNamara

DBG_ASSERT->assert when followed by dereference

Change-Id: I9390228721df1b713d8cf2e719854b74d6b639c8
üst 82a30a45
...@@ -250,7 +250,7 @@ SbStdFont::SbStdFont() : ...@@ -250,7 +250,7 @@ SbStdFont::SbStdFont() :
// handle name property yourself // handle name property yourself
p = Find( OUString("Name"), SbxCLASS_PROPERTY ); p = Find( OUString("Name"), SbxCLASS_PROPERTY );
DBG_ASSERT( p, "No Name Property" ); assert(p && "No Name Property");
p->SetUserData( ATTR_IMP_NAME ); p->SetUserData( ATTR_IMP_NAME );
} }
...@@ -399,7 +399,7 @@ SbStdClipboard::SbStdClipboard() : ...@@ -399,7 +399,7 @@ SbStdClipboard::SbStdClipboard() :
SbxObject( OUString("Clipboard") ) SbxObject( OUString("Clipboard") )
{ {
SbxVariable* p = Find( OUString("Name"), SbxCLASS_PROPERTY ); SbxVariable* p = Find( OUString("Name"), SbxCLASS_PROPERTY );
DBG_ASSERT( p, "No Name Property" ); assert(p && "No Name Property");
p->SetUserData( ATTR_IMP_NAME ); p->SetUserData( ATTR_IMP_NAME );
// register methods // register methods
......
...@@ -105,7 +105,7 @@ OSortIndex::~OSortIndex() ...@@ -105,7 +105,7 @@ OSortIndex::~OSortIndex()
void OSortIndex::AddKeyValue(OKeyValue * pKeyValue) void OSortIndex::AddKeyValue(OKeyValue * pKeyValue)
{ {
OSL_ENSURE(pKeyValue,"Can not be null here!"); assert(pKeyValue && "Can not be null here!");
if(m_bFrozen) if(m_bFrozen)
{ {
m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),(OKeyValue *)NULL)); m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),(OKeyValue *)NULL));
...@@ -115,8 +115,6 @@ void OSortIndex::AddKeyValue(OKeyValue * pKeyValue) ...@@ -115,8 +115,6 @@ void OSortIndex::AddKeyValue(OKeyValue * pKeyValue)
m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),pKeyValue)); m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),pKeyValue));
} }
void OSortIndex::Freeze() void OSortIndex::Freeze()
{ {
OSL_ENSURE(! m_bFrozen,"OSortIndex::Freeze: already frozen!"); OSL_ENSURE(! m_bFrozen,"OSortIndex::Freeze: already frozen!");
......
...@@ -408,10 +408,10 @@ namespace dbtools ...@@ -408,10 +408,10 @@ namespace dbtools
} }
else else
{ {
if ( pParseNode->count() >= 3 ) if (pParseNode->count() >= 3)
{ {
OSQLParseNode* pValueNode = pParseNode->getChild(2); OSQLParseNode* pValueNode = pParseNode->getChild(2);
OSL_ENSURE( pValueNode, "OPredicateInputController::getPredicateValue: invalid node child!" ); assert(pValueNode && "OPredicateInputController::getPredicateValue: invalid node child!");
if ( !_bForStatementUse ) if ( !_bForStatementUse )
{ {
if ( SQL_NODE_STRING == pValueNode->getNodeType() ) if ( SQL_NODE_STRING == pValueNode->getNodeType() )
......
...@@ -273,7 +273,7 @@ SfxItemPool& SfxShell::GetPool() const ...@@ -273,7 +273,7 @@ SfxItemPool& SfxShell::GetPool() const
*/ */
{ {
DBG_ASSERT( pPool, "no pool" ); assert(pPool && "no pool");
return *pPool; return *pPool;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment