summaryrefslogtreecommitdiff
path: root/idl/source
diff options
context:
space:
mode:
authorRafael Dominguez <venccsralph@gmail.com>2011-02-27 21:35:16 -0800
committerJoseph Powers <jpowers27@cox.net>2011-02-27 21:35:16 -0800
commitb091c9f867b87d085c0353f61b8f03fa7e6cbd2b (patch)
treee563ff700b391a17a6e170a440104a774c6bf99e /idl/source
parentcfc854af6e640efbda1a1f135a81bc5444a814a0 (diff)
PATCH 1/2] Remove SvULongs and replace it with std::vector<ULONG>
Diffstat (limited to 'idl/source')
-rw-r--r--idl/source/objects/object.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 92f8b7445d02..0cb39c367122 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -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);