PATCH 1/2] Remove SvULongs and replace it with std::vector<ULONG>
This commit is contained in:
parent
cfc854af6e
commit
b091c9f867
2 changed files with 8 additions and 19 deletions
|
@ -49,14 +49,6 @@ DECLARE_LIST( SvSlotElementList, SvSlotElement* )
|
|||
class SvMetaClass;
|
||||
typedef ::std::vector< SvMetaClass* > SvMetaClassList;
|
||||
|
||||
class SvULongs : public List
|
||||
{
|
||||
public:
|
||||
void Insert( ULONG& rId, ULONG nPos ) { ULONG nId(rId ); List::Insert( (void*) nId, nPos ); }
|
||||
void Remove( ULONG& rId ){ ULONG nId(rId ); List::Remove( (void*) nId ); }
|
||||
ULONG GetObject( ULONG nPos ){ return (ULONG) List::GetObject( nPos ); }
|
||||
};
|
||||
|
||||
SV_DECL_REF(SvMetaClass)
|
||||
class SvClassElement : public SvPersistBase
|
||||
{
|
||||
|
@ -111,7 +103,7 @@ class SvMetaClass : public SvMetaType
|
|||
SvIdlDataBase & rBase,
|
||||
SvStream & rOutStm );
|
||||
|
||||
void InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList,
|
||||
void InsertSlots( SvSlotElementList& rList, std::vector<ULONG>& rSuperList,
|
||||
SvMetaClassList & rClassList,
|
||||
const ByteString & rPrefix, SvIdlDataBase& rBase );
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ USHORT SvMetaClass::WriteSlots( const ByteString & rShellName,
|
|||
return nSCount;
|
||||
}
|
||||
|
||||
void SvMetaClass::InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList,
|
||||
void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<ULONG>& rSuperList,
|
||||
SvMetaClassList &rClassList,
|
||||
const ByteString & rPrefix, SvIdlDataBase& rBase)
|
||||
{
|
||||
|
@ -490,18 +490,15 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList,
|
|||
SvMetaAttribute * pAttr = aAttrList.GetObject( n );
|
||||
|
||||
ULONG nId = pAttr->GetSlotId().GetValue();
|
||||
USHORT nPos;
|
||||
for ( nPos=0; nPos < rSuperList.Count(); nPos++ )
|
||||
{
|
||||
if ( rSuperList.GetObject(nPos) == nId )
|
||||
break;
|
||||
}
|
||||
|
||||
if( nPos == rSuperList.Count() )
|
||||
std::vector<ULONG>::iterator iter = std::find(rSuperList.begin(),
|
||||
rSuperList.end(),nId);
|
||||
|
||||
if( iter == rSuperList.end() )
|
||||
{
|
||||
// Write only if not already written by subclass or
|
||||
// imported interface.
|
||||
rSuperList.Insert( nId, nPos );
|
||||
rSuperList.push_back(nId);
|
||||
pAttr->Insert(rList, rPrefix, rBase);
|
||||
}
|
||||
}
|
||||
|
@ -591,7 +588,7 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
|
|||
rOutStm << "SFX_ARGUMENTMAP(" << GetName().GetBuffer() << ')' << endl
|
||||
<< '{' << endl;
|
||||
|
||||
SvULongs aSuperList;
|
||||
std::vector<ULONG> aSuperList;
|
||||
SvMetaClassList classList;
|
||||
SvSlotElementList aSlotList;
|
||||
InsertSlots(aSlotList, aSuperList, classList, ByteString(), rBase);
|
||||
|
|
Loading…
Reference in a new issue