summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/IceUtil/Handle.h')
-rw-r--r--cpp/include/IceUtil/Handle.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h
index 2eeb58c8830..8e75db3bae4 100644
--- a/cpp/include/IceUtil/Handle.h
+++ b/cpp/include/IceUtil/Handle.h
@@ -7,8 +7,7 @@
//
// **********************************************************************
-#ifndef ICE_UTIL_HANDLE_H
-#define ICE_UTIL_HANDLE_H
+#pragma once
#include <IceUtil/Exception.h>
#include <algorithm>
@@ -147,17 +146,6 @@ template<typename T>
class Handle : public HandleBase<T>
{
public:
-
-#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
- //
- // C++Builder 2009 does not allow setting Ptr to 0.
- //
- Handle(int p)
- {
- assert(p == 0);
- this->_ptr = 0;
- }
-#endif
Handle(T* p = 0)
{
@@ -262,24 +250,14 @@ public:
template<class Y>
static Handle dynamicCast(const HandleBase<Y>& r)
{
-#ifdef __BCPLUSPLUS__
- return Handle<T>(dynamic_cast<T*>(r._ptr));
-#else
return Handle(dynamic_cast<T*>(r._ptr));
-#endif
}
template<class Y>
static Handle dynamicCast(Y* p)
{
-#ifdef __BCPLUSPLUS__
- return Handle<T>(dynamic_cast<T*>(p));
-#else
return Handle(dynamic_cast<T*>(p));
-#endif
}
};
}
-
-#endif