Skip to content

Commit e0d8ed1

Browse files
authored
Merge pull request #2239 from jwillemsen/jwi-pi23
Use std::vector in Interceptor List
2 parents 074b871 + deef2c3 commit e0d8ed1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

TAO/tao/PI/Interceptor_List_T.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ namespace TAO
8787

8888
/// Increase the length of the Interceptor sequence by one.
8989
size_t const new_len = old_len + 1;
90-
this->interceptors_.size (new_len);
90+
this->interceptors_.resize (new_len);
9191

9292
// Add the interceptor
9393
this->interceptors_[old_len].interceptor_ =
@@ -162,7 +162,7 @@ namespace TAO
162162

163163
/// Increase the length of the Interceptor sequence by one.
164164
size_t const new_len = old_len + 1;
165-
this->interceptors_.size (new_len);
165+
this->interceptors_.resize (new_len);
166166

167167
// Add the interceptor
168168
this->interceptors_[old_len].interceptor_ =
@@ -207,7 +207,7 @@ namespace TAO
207207
// since some interceptors may not have been destroyed yet.
208208
// Note that this size reduction is fast since no memory is
209209
// actually deallocated.
210-
this->interceptors_.size (ilen);
210+
this->interceptors_.resize (ilen);
211211
}
212212
}
213213
catch (...)

TAO/tao/PI/Interceptor_List_T.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
#include /**/ "ace/pre.h"
1616

17-
#include "ace/Array_Base.h"
17+
#include "tao/orbconf.h"
1818

1919
#if !defined (ACE_LACKS_PRAGMA_ONCE)
2020
# pragma once
2121
#endif /* ACE_LACKS_PRAGMA_ONCE */
2222

23-
#include "tao/orbconf.h"
23+
#include <vector>
2424

2525
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
2626

@@ -79,7 +79,7 @@ namespace TAO
7979
size_t size () const;
8080

8181
private:
82-
typedef ACE_Array_Base<RegisteredInterceptor > RegisteredArray;
82+
using RegisteredArray = std::vector<RegisteredInterceptor>;
8383

8484
/// Dynamic array of registered interceptors.
8585
RegisteredArray interceptors_;

TAO/tao/PI/PICurrent_Impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ namespace TAO
8383
/// been changed.)
8484
void set_callback_for_impending_change (PICurrent_Impl *p);
8585

86-
/// Typedef for the underyling "slot table."
87-
typedef ACE_Array_Base<CORBA::Any> Table;
86+
/// Type for the underyling "slot table."
87+
using Table = ACE_Array_Base<CORBA::Any>;
8888

8989
/// Return a reference to the slot table currently associated
9090
/// with this PICurrent_Impl object.

0 commit comments

Comments
 (0)