Kaydet (Commit) 2da415ee authored tarafından Stephan Bergmann's avatar Stephan Bergmann

UtBool -> bool

Change-Id: I4cec5ba61762ac87d5bfb07b15ab661955e207ac
üst b32b45c5
......@@ -66,20 +66,20 @@ CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
cNameListElmt.SetNamedObject(this);
}
UtBool CBenNamedObject::IsNamedObject()
{ return UT_TRUE; }
bool CBenNamedObject::IsNamedObject()
{ return true; }
UtBool CBenNamedObject::IsPropertyName()
{ return UT_FALSE; }
bool CBenNamedObject::IsPropertyName()
{ return false; }
UtBool CBenNamedObject::IsTypeName()
{ return UT_FALSE; }
bool CBenNamedObject::IsTypeName()
{ return false; }
UtBool CBenPropertyName::IsPropertyName()
{ return UT_TRUE; }
bool CBenPropertyName::IsPropertyName()
{ return true; }
UtBool CBenTypeName::IsTypeName()
{ return UT_TRUE; }
bool CBenTypeName::IsTypeName()
{ return true; }
} // end namespace OpenStormBento
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -57,10 +57,10 @@
namespace OpenStormBento
{
UtBool
bool
CBenObject::IsNamedObject()
{
return UT_FALSE;
return false;
}
pCBenProperty
......
......@@ -252,7 +252,7 @@ class CBenObject : public CBenIDListElmt
public:
pCBenProperty UseProperty(BenObjectID PropertyID);
pCBenValue UseValue(BenObjectID PropertyID);
virtual UtBool IsNamedObject();
virtual bool IsNamedObject();
pLtcBenContainer GetContainer() { return cpContainer; }
BenObjectID GetObjectID() { return GetID(); }
public: // Internal methods
......@@ -354,24 +354,24 @@ class CBenValueSegment : public CUtListElmt
public: // Internal methods
CBenValueSegment(pCBenValue pValue, BenContainerPos Pos,
unsigned long Size) : CUtListElmt(pValue->GetValueSegments())
{ cpValue = pValue; cImmediate = UT_FALSE; cPos = Pos;
{ cpValue = pValue; cImmediate = false; cPos = Pos;
cSize = Size; }
CBenValueSegment(pCBenValue pValue, BenConstDataPtr pImmData,
unsigned short Size) : CUtListElmt(pValue->GetValueSegments())
{ cpValue = pValue; cImmediate = UT_TRUE;
{ cpValue = pValue; cImmediate = true;
UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; }
CBenValueSegment(BenContainerPos Pos, unsigned long Size)
{ cpValue = NULL; cImmediate = UT_FALSE; cPos = Pos;
{ cpValue = NULL; cImmediate = false; cPos = Pos;
cSize = Size; }
CBenValueSegment(BenConstDataPtr pImmData, unsigned short Size)
{ cpValue = NULL; cImmediate = UT_TRUE;
{ cpValue = NULL; cImmediate = true;
UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; }
UtBool IsLast()
bool IsLast()
{
return cpValue == NULL || cpValue->GetValueSegments()->GetLast() ==
this;
}
UtBool IsImmediate() { return cImmediate; }
bool IsImmediate() { return cImmediate; }
BenContainerPos GetPosition() { return cPos; }
unsigned long GetSize() { return cSize; }
void SetSize(unsigned long Size) { cSize = Size; }
......@@ -379,7 +379,7 @@ public: // Internal methods
private: // Data
pCBenValue cpValue;
UtBool cImmediate;
bool cImmediate;
union
{
BenContainerPos cPos;
......@@ -398,9 +398,9 @@ inline pLtcBenContainer CBenValue::GetContainer()
class CBenNamedObject : public CBenObject
{
public: // Methods
virtual UtBool IsNamedObject();
virtual UtBool IsPropertyName();
virtual UtBool IsTypeName();
virtual bool IsNamedObject();
virtual bool IsPropertyName();
virtual bool IsTypeName();
public: // Internal methods
CBenNamedObject(pLtcBenContainer pContainer, BenObjectID ObjectID,
......@@ -431,7 +431,7 @@ public: // Internal methods
pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
pPrevNamedObjectListElmt) { ; }
virtual UtBool IsPropertyName();
virtual bool IsPropertyName();
};
class CBenTypeName : public CBenNamedObject
......@@ -442,7 +442,7 @@ public: // Internal methods
pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
pPrevNamedObjectListElmt) { ; }
virtual UtBool IsTypeName();
virtual bool IsTypeName();
};
......
......@@ -372,8 +372,8 @@ CBenTOCReader::ReadSegment(pCBenValue pValue, BenByte * pLookAhead)
{
BenError Err;
UtBool Immediate = UT_FALSE;
UtBool EightByteOffset = UT_FALSE;
bool Immediate = false;
bool EightByteOffset = false;
unsigned long Offset(0), Length(0);
switch (*pLookAhead)
......@@ -387,29 +387,29 @@ CBenTOCReader::ReadSegment(pCBenValue pValue, BenByte * pLookAhead)
break;
case BEN_IMMEDIATE0:
Length = 0; Immediate = UT_TRUE;
Length = 0; Immediate = true;
break;
case BEN_IMMEDIATE1:
Length = 1; Immediate = UT_TRUE;
Length = 1; Immediate = true;
break;
case BEN_IMMEDIATE2:
Length = 2; Immediate = UT_TRUE;
Length = 2; Immediate = true;
break;
case BEN_IMMEDIATE3:
Length = 3; Immediate = UT_TRUE;
Length = 3; Immediate = true;
break;
case BEN_CONT_IMMEDIATE4:
case BEN_IMMEDIATE4:
Length = 4; Immediate = UT_TRUE;
Length = 4; Immediate = true;
break;
case BEN_CONT_OFFSET8_LEN4:
case BEN_OFFSET8_LEN4:
EightByteOffset = UT_TRUE;
EightByteOffset = true;
break;
default:
......@@ -440,7 +440,7 @@ CBenTOCReader::ReadSegment(pCBenValue pValue, BenByte * pLookAhead)
return BenErr_OK;
}
UtBool
bool
CBenTOCReader::CanGetData(unsigned long Amt)
{
return cCurr + Amt <= cTOCSize;
......
......@@ -72,7 +72,7 @@ private: // Methods
BenError ReadTOC();
BenError ReadSegments(pCBenValue pValue, BenByte * pLookAhead);
BenError ReadSegment(pCBenValue pValue, BenByte * pLookAhead);
UtBool CanGetData(unsigned long Amt);
bool CanGetData(unsigned long Amt);
BenError GetByte(BenByte * pByte);
BenError GetDWord(BenDWord * pDWord);
BenByte GetCode();
......
......@@ -68,13 +68,9 @@ namespace OpenStormBento
#define UtErr_OK 0
#define UtErr_Fail 1
#define UT_TRUE sal_True
#define UT_FALSE sal_False
#define UtByte sal_uInt8
#define UtDWord sal_uInt32
#define UtWord sal_uInt16
#define UtBool sal_Int32
#define UtDefClassP(Name) class Name; typedef Name * p##Name; \
typedef const Name * pConst##Name
......
......@@ -82,7 +82,7 @@ public: // Methods
cpNext->cpPrev = cpPrev;
cpNext = NULL;
}
UtBool OnList() { return cpNext != NULL; }
bool OnList() { return cpNext != NULL; }
void MakeNotOnList() { cpNext = NULL; } // Same as Remove but doesn't
// patch up list
pCUtListElmt GetNext() const { return cpNext; }
......@@ -129,8 +129,8 @@ public: // Methods
pCUtListElmt GetLast() { return cDummyElmt.GetPrev(); }
pCUtListElmt GetTerminating() { return &cDummyElmt; }
pCUtListElmt GetNextOrNULL(pCUtListElmt pCurr);
UtBool IsEmpty() { return GetFirst() == GetTerminating(); };
UtBool ContainsAtLeastTwoItems() { return GetFirst() != GetLast(); };
bool IsEmpty() { return GetFirst() == GetTerminating(); };
bool ContainsAtLeastTwoItems() { return GetFirst() != GetLast(); };
void Destroy(void);
......
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