summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/IceUtil')
-rw-r--r--cpp/include/IceUtil/IceUtil.h1
-rw-r--r--cpp/include/IceUtil/SHA1.h47
-rw-r--r--cpp/include/IceUtil/UniquePtr.h109
3 files changed, 0 insertions, 157 deletions
diff --git a/cpp/include/IceUtil/IceUtil.h b/cpp/include/IceUtil/IceUtil.h
index ca25d393152..b7b3c3c30c3 100644
--- a/cpp/include/IceUtil/IceUtil.h
+++ b/cpp/include/IceUtil/IceUtil.h
@@ -40,7 +40,6 @@
#include <IceUtil/Time.h>
#include <IceUtil/Timer.h>
#include <IceUtil/UUID.h>
-#include <IceUtil/UniquePtr.h>
#include <IceUtil/PopDisableWarnings.h>
#endif
diff --git a/cpp/include/IceUtil/SHA1.h b/cpp/include/IceUtil/SHA1.h
deleted file mode 100644
index d3ec7e48499..00000000000
--- a/cpp/include/IceUtil/SHA1.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_UTIL_SHA1_H
-#define ICE_UTIL_SHA1_H
-
-#include <IceUtil/Config.h>
-#include <IceUtil/UniquePtr.h>
-
-#include <vector>
-
-namespace IceUtilInternal
-{
-
-ICE_API void
-sha1(const unsigned char*, std::size_t, std::vector<unsigned char>&);
-
-#ifndef ICE_OS_UWP
-class ICE_API SHA1
-{
-public:
-
- SHA1();
- ~SHA1();
-
- void update(const unsigned char*, std::size_t);
- void finalize(std::vector<unsigned char>&);
-
-private:
-
- // noncopyable
- SHA1(const SHA1&);
- SHA1 operator=(const SHA1&);
-
- class Hasher;
- IceUtil::UniquePtr<Hasher> _hasher;
-};
-#endif
-
-}
-#endif
diff --git a/cpp/include/IceUtil/UniquePtr.h b/cpp/include/IceUtil/UniquePtr.h
deleted file mode 100644
index 0a81df47fad..00000000000
--- a/cpp/include/IceUtil/UniquePtr.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-#ifndef ICE_UTIL_UNIQUE_PTR_H
-#define ICE_UTIL_UNIQUE_PTR_H
-
-#include <IceUtil/Config.h>
-
-namespace IceUtil
-{
-
-#ifdef ICE_CPP11_MAPPING
-
-template<typename T>
-using UniquePtr = std::unique_ptr<T>;
-
-#else
-
-template<typename T>
-class UniquePtr
-{
-public:
-
- explicit UniquePtr(T* ptr = 0) :
- _ptr(ptr)
- {
- }
-
- UniquePtr(UniquePtr& o) :
- _ptr(o.release())
- {
- }
-
- UniquePtr& operator=(UniquePtr& o)
- {
- reset(o.release());
- return *this;
- }
-
- ~UniquePtr()
- {
- if(_ptr != 0)
- {
- delete _ptr;
- }
- }
-
- T* release()
- {
- T* r = _ptr;
- _ptr = 0;
- return r;
- }
-
- void reset(T* ptr = 0)
- {
- assert(ptr == 0 || ptr != _ptr);
-
- if(_ptr != 0)
- {
- delete _ptr;
- }
- _ptr = ptr;
- }
-
- T& operator*() const
- {
- return *_ptr;
- }
-
- T* operator->() const
- {
- return _ptr;
- }
-
-
- T* get() const
- {
- return _ptr;
- }
-
- operator bool() const
- {
- return _ptr != 0;
- }
-
- void swap(UniquePtr& a)
- {
- T* tmp = a._ptr;
- a._ptr = _ptr;
- _ptr = tmp;
- }
-
-private:
-
- T* _ptr;
-};
-
-#endif
-
-} // End of namespace IceUtil
-
-#endif