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