mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
more cleanup
+pre-incrementing of iters is faster
This commit is contained in:
parent
b2bb1c096b
commit
8084d7c0e4
25 changed files with 216 additions and 181 deletions
|
|
@ -484,7 +484,7 @@ ObjArray::ObjArray( const ObjArray& copyfrom ) :
|
|||
|
||||
void ObjArray::deepcopy()
|
||||
{
|
||||
for( iterator itr = ref_arr.begin(); itr != ref_arr.end(); itr++ )
|
||||
for( iterator itr = ref_arr.begin(); itr != ref_arr.end(); ++itr )
|
||||
{
|
||||
if (itr->get())
|
||||
{
|
||||
|
|
@ -494,6 +494,7 @@ void ObjArray::deepcopy()
|
|||
No, we're making a copy, leaving the original be.
|
||||
(SO, bno's refcount should be >1 here)
|
||||
*/
|
||||
|
||||
BObject *bo = itr->get();
|
||||
itr->set( new BObject( bo->impptr()->copy() ) );
|
||||
}
|
||||
|
|
@ -986,7 +987,7 @@ BObjectImp* ObjArray::call_method( const char* methodname, Executor& ex )
|
|||
void ObjArray::packonto( ostream& os ) const
|
||||
{
|
||||
os << "a" << ref_arr.size() << ":";
|
||||
for( const_iterator itr = ref_arr.begin(); itr != ref_arr.end(); itr++ )
|
||||
for( const_iterator itr = ref_arr.begin(); itr != ref_arr.end(); ++itr )
|
||||
{
|
||||
if (itr->get())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue