--- a/persistentstorage/sql/SRC/Common/SqlBufIterator.inl Tue Aug 31 16:57:14 2010 +0300
+++ b/persistentstorage/sql/SRC/Common/SqlBufIterator.inl Wed Sep 01 12:39:58 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -46,7 +46,7 @@
*/
inline void TSqlBufRIterator::MoveTo(TInt aIndex)
{
- __ASSERT_DEBUG((iBegin + (TUint)aIndex) < iEnd, __SQLPANIC(ESqlPanicBadArgument));
+ __SQLASSERT((iBegin + (TUint)aIndex) < iEnd, ESqlPanicBadArgument);
iCurrent = iBegin + aIndex;
}
@@ -55,7 +55,7 @@
*/
inline TBool TSqlBufRIterator::IsPresent() const
{
- __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError);
return iCurrent->iPos > 0;
}
@@ -64,7 +64,7 @@
*/
inline TInt TSqlBufRIterator::Type() const
{
- __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError);
return iCurrent->Type();
}
@@ -73,7 +73,7 @@
*/
inline TInt TSqlBufRIterator::Size() const
{
- __ASSERT_DEBUG(iCurrent >= iBegin && iCurrent < iEnd, __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iCurrent >= iBegin && iCurrent < iEnd, ESqlPanicInternalError);
return Type() == ESqlText ? iCurrent->Size() / sizeof(TUint16) : iCurrent->Size();
}
@@ -101,7 +101,7 @@
*/
inline TBool TSqlBufWIterator::Next()
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
return ++iIndex < iBuf->Count();
}
@@ -112,8 +112,8 @@
*/
inline void TSqlBufWIterator::MoveTo(TInt aIndex)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)aIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)aIndex < iBuf->Count(), ESqlPanicInternalError);
iIndex = aIndex;
}
@@ -122,8 +122,8 @@
*/
inline void TSqlBufWIterator::SetNull()
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
(void)iBuf->SetField(iIndex, ESqlNull, NULL, 0);
}
@@ -135,10 +135,10 @@
*/
inline void TSqlBufWIterator::SetAsNotPresent(TInt aType, TInt aLength)
{
- __ASSERT_DEBUG(::IsSequenceSqlType(aType), __SQLPANIC(ESqlPanicBadArgument));
- __ASSERT_DEBUG(aLength >= 0, __SQLPANIC(ESqlPanicBadArgument));
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(::IsSequenceSqlType(aType), ESqlPanicBadArgument);
+ __SQLASSERT(aLength >= 0, ESqlPanicBadArgument);
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
iBuf->SetField(iIndex, aType, NULL, aType == ESqlText ? aLength * sizeof(TUint16) : aLength);
}
@@ -152,8 +152,8 @@
*/
inline TInt TSqlBufWIterator::SetInt(TInt aValue)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
return iBuf->SetField(iIndex, ESqlInt, &aValue, sizeof(TInt));
}
@@ -167,8 +167,8 @@
*/
inline TInt TSqlBufWIterator::SetInt64(TInt64 aValue)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
return iBuf->SetField(iIndex, ESqlInt64, &aValue, sizeof(TInt64));
}
@@ -182,8 +182,8 @@
*/
inline TInt TSqlBufWIterator::SetReal(TReal aValue)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
return iBuf->SetField(iIndex, ESqlReal, &aValue, sizeof(TReal));
}
@@ -197,8 +197,8 @@
*/
inline TInt TSqlBufWIterator::SetBinary(const TDesC8& aValue)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
return iBuf->SetField(iIndex, ESqlBinary, aValue.Ptr(), aValue.Length());
}
@@ -212,8 +212,8 @@
*/
inline TInt TSqlBufWIterator::SetText(const TDesC16& aValue)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
return iBuf->SetField(iIndex, ESqlText, aValue.Ptr(), aValue.Length() * sizeof(TUint16));
}
@@ -228,7 +228,7 @@
*/
inline TInt TSqlBufWIterator::SetZeroBlob(TInt aSize)
{
- __ASSERT_DEBUG(iBuf != NULL, __SQLPANIC(ESqlPanicInternalError));
- __ASSERT_DEBUG((TUint)iIndex < iBuf->Count(), __SQLPANIC(ESqlPanicInternalError));
+ __SQLASSERT(iBuf != NULL, ESqlPanicInternalError);
+ __SQLASSERT((TUint)iIndex < iBuf->Count(), ESqlPanicInternalError);
return iBuf->SetField(iIndex, ESqlZeroBlob, &aSize, sizeof(TInt));
}