summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2021-07-16 16:44:16 +0200
committerGitHub <noreply@github.com>2021-07-16 16:44:16 +0200
commitf4c3d81895c79868c5695879d614c8ced6494741 (patch)
tree554dc7fe1dbb40e502eb11b8e4b4ac6a62bd756e /ACE
parent1e700ccbf6dcbe8e2edffae9285139dd246a5028 (diff)
parent940aaf09fcaba4d101a27f92830746889629a319 (diff)
downloadATCD-f4c3d81895c79868c5695879d614c8ced6494741.tar.gz
Merge pull request #1608 from jwillemsen/jwi-embarcaderocleanup
Cleanup some workarounds for old Embarcadero compilers
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ace/Bound_Ptr.h8
-rw-r--r--ACE/ace/Bound_Ptr.inl6
-rw-r--r--ACE/ace/Future.h3
-rw-r--r--ACE/ace/High_Res_Timer.cpp13
4 files changed, 9 insertions, 21 deletions
diff --git a/ACE/ace/Bound_Ptr.h b/ACE/ace/Bound_Ptr.h
index ab39bc10623..a406cab3ce9 100644
--- a/ACE/ace/Bound_Ptr.h
+++ b/ACE/ace/Bound_Ptr.h
@@ -121,7 +121,7 @@ public:
template <class Y>
ACE_Strong_Bound_Ptr (const ACE_Strong_Bound_Ptr<Y, ACE_LOCK> &r)
: counter_ (r.counter_),
- ptr_ (dynamic_cast<X_t*>(r.ptr_))
+ ptr_ (dynamic_cast<X*>(r.ptr_))
{
// This ctor is temporarily defined here to increase our chances
// of being accepted by broken compilers.
@@ -151,7 +151,7 @@ public:
// This will work if &r == this, by first increasing the ref count
COUNTER *new_counter = r.counter_;
- X* new_ptr = dynamic_cast<X_t*> (r.ptr_);
+ X* new_ptr = dynamic_cast<X*> (r.ptr_);
COUNTER::attach_strong (new_counter);
if (COUNTER::detach_strong (this->counter_) == 0)
delete this->ptr_;
@@ -214,8 +214,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
private:
- typedef X X_t; // This indirection is for Borland C++.
-
friend class ACE_Weak_Bound_Ptr<X, ACE_LOCK>;
template <class Y, class L>
@@ -350,8 +348,6 @@ public:
ACE_ALLOC_HOOK_DECLARE;
private:
- typedef X X_t; // This indirection is for Borland C++.
-
friend class ACE_Strong_Bound_Ptr<X, ACE_LOCK>;
/// The ACE_Bound_Ptr_Counter type.
diff --git a/ACE/ace/Bound_Ptr.inl b/ACE/ace/Bound_Ptr.inl
index 5a7de11982a..17ffe620f71 100644
--- a/ACE/ace/Bound_Ptr.inl
+++ b/ACE/ace/Bound_Ptr.inl
@@ -173,7 +173,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Strong_Bound_Ptr<X, ACE
return;
COUNTER *new_counter = rhs.counter_;
- X_t *new_ptr = rhs.ptr_;
+ X *new_ptr = rhs.ptr_;
COUNTER::attach_strong (new_counter);
if (COUNTER::detach_strong (this->counter_) == 0)
delete this->ptr_;
@@ -190,7 +190,7 @@ ACE_Strong_Bound_Ptr<X, ACE_LOCK>::operator = (const ACE_Weak_Bound_Ptr<X, ACE_L
return;
COUNTER *new_counter = rhs.counter_;
- X_t *new_ptr = rhs.ptr_;
+ X *new_ptr = rhs.ptr_;
// When creating a strong pointer from a weak one we can't assume that the
// underlying object still exists. Therefore we must check for a return value
@@ -274,7 +274,7 @@ template<class X, class ACE_LOCK> inline void
ACE_Strong_Bound_Ptr<X, ACE_LOCK>::reset (X *p)
{
COUNTER *old_counter = this->counter_;
- X_t *old_ptr = this->ptr_;
+ X *old_ptr = this->ptr_;
this->counter_ = COUNTER::create_strong ();
this->ptr_ = p;
if (COUNTER::detach_strong (old_counter) == 0)
diff --git a/ACE/ace/Future.h b/ACE/ace/Future.h
index 8238511b765..e928370f1e6 100644
--- a/ACE/ace/Future.h
+++ b/ACE/ace/Future.h
@@ -161,9 +161,6 @@ private:
// = Encapsulate reference count and object lifetime of instances.
- // These methods must go after the others to work around a bug with
- // Borland's C++ Builder...
-
/// Allocate a new ACE_Future_Rep<T> instance, returning NULL if it
/// cannot be created.
static ACE_Future_Rep<T> *internal_create (void);
diff --git a/ACE/ace/High_Res_Timer.cpp b/ACE/ace/High_Res_Timer.cpp
index e849e19a013..ef30f0833fb 100644
--- a/ACE/ace/High_Res_Timer.cpp
+++ b/ACE/ace/High_Res_Timer.cpp
@@ -374,8 +374,7 @@ ACE_High_Res_Timer::elapsed_time (ACE_hrtime_t &nanoseconds) const
// For more background on this, please see bugzilla #1024.
nanoseconds = ACE_High_Res_Timer::elapsed_hrtime (this->end_, this->start_)
* (1024000u / ACE_High_Res_Timer::global_scale_factor ());
- // Caution - Borland has a problem with >>=, so resist the temptation.
- nanoseconds = nanoseconds >> 10;
+ nanoseconds >>= 10;
// Right shift is implemented for non native 64-bit ints
// operator/ only for a 32 bit result !
#else
@@ -391,15 +390,11 @@ ACE_High_Res_Timer::elapsed_time_incr (ACE_hrtime_t &nanoseconds) const
{
#if !defined (ACE_WIN32)
// Same as above.
- nanoseconds = this->total_
- * (1024000u / ACE_High_Res_Timer::global_scale_factor ());
- // Caution - Borland has a problem with >>=, so resist the temptation.
- nanoseconds = nanoseconds >> 10;
+ nanoseconds = this->total_ * (1024000u / ACE_High_Res_Timer::global_scale_factor ());
+ nanoseconds >>= 10;
#else
// This a higher-precision version, specific for Windows systems
- nanoseconds =
- this->total_ * 1000000000u /
- ACE_High_Res_Timer::global_scale_factor ();
+ nanoseconds = this->total_ * 1000000000u / ACE_High_Res_Timer::global_scale_factor ();
#endif
}