Skip to content

Commit

Permalink
Merge pull request #2239 from jwillemsen/jwi-pi23
Browse files Browse the repository at this point in the history
Use std::vector in Interceptor List
  • Loading branch information
jwillemsen authored May 22, 2024
2 parents 074b871 + deef2c3 commit e0d8ed1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions TAO/tao/PI/Interceptor_List_T.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ namespace TAO

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

// Add the interceptor
this->interceptors_[old_len].interceptor_ =
Expand Down Expand Up @@ -162,7 +162,7 @@ namespace TAO

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

// Add the interceptor
this->interceptors_[old_len].interceptor_ =
Expand Down Expand Up @@ -207,7 +207,7 @@ namespace TAO
// since some interceptors may not have been destroyed yet.
// Note that this size reduction is fast since no memory is
// actually deallocated.
this->interceptors_.size (ilen);
this->interceptors_.resize (ilen);
}
}
catch (...)
Expand Down
6 changes: 3 additions & 3 deletions TAO/tao/PI/Interceptor_List_T.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@

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

#include "ace/Array_Base.h"
#include "tao/orbconf.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/orbconf.h"
#include <vector>

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

Expand Down Expand Up @@ -79,7 +79,7 @@ namespace TAO
size_t size () const;

private:
typedef ACE_Array_Base<RegisteredInterceptor > RegisteredArray;
using RegisteredArray = std::vector<RegisteredInterceptor>;

/// Dynamic array of registered interceptors.
RegisteredArray interceptors_;
Expand Down
4 changes: 2 additions & 2 deletions TAO/tao/PI/PICurrent_Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ namespace TAO
/// been changed.)
void set_callback_for_impending_change (PICurrent_Impl *p);

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

/// Return a reference to the slot table currently associated
/// with this PICurrent_Impl object.
Expand Down

0 comments on commit e0d8ed1

Please sign in to comment.