From 838eb61093c89dabcf1346066288a1d197b575ab Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Sat, 6 Jan 2018 22:55:39 +0500 Subject: [PATCH] xrCore/_stl_extensions.h: removed unused code Also removed include guard --- src/xrCore/_stl_extensions.h | 104 ----------------------------------- 1 file changed, 104 deletions(-) diff --git a/src/xrCore/_stl_extensions.h b/src/xrCore/_stl_extensions.h index 69a66b7d20f..9173dfd73ac 100644 --- a/src/xrCore/_stl_extensions.h +++ b/src/xrCore/_stl_extensions.h @@ -1,11 +1,5 @@ #pragma once -#ifndef _STL_EXT_internal -#define _STL_EXT_internal -#include -#include -#include -#include #include "_types.h" #include "_rect.h" #include "_plane.h" @@ -30,99 +24,6 @@ using std::swap; -#ifdef __BORLANDC__ -#ifndef M_NOSTDCONTAINERS_EXT -#define M_NOSTDCONTAINERS_EXT -#endif -#endif - -#ifdef M_NOSTDCONTAINERS_EXT - -#define xr_list std::list -#define xr_deque std::deque -#define xr_stack std::stack -#define xr_set std::set -#define xr_multiset std::multiset -#define xr_map std::map -#define xr_hash_map std::hash_map -#define xr_multimap std::multimap -#define xr_string std::string - -template -class xr_vector : public std::vector -{ -public: - typedef size_t size_type; - typedef T& reference; - typedef const T& const_reference; - -public: - xr_vector() : std::vector() {} - xr_vector(size_t _count, const T& _value) : std::vector(_count, _value) {} - explicit xr_vector(size_t _count) : std::vector(_count) {} - ICF const_reference operator[](size_type _Pos) const - { - { - VERIFY(_Pos < size()); - } - return (*(begin() + _Pos)); - } - ICF reference operator[](size_type _Pos) - { - { - VERIFY(_Pos < size()); - } - return (*(begin() + _Pos)); - } -}; - -template <> -class xr_vector : public std::vector -{ - typedef bool T; - -public: - xr_vector() : std::vector() {} - xr_vector(size_t _count, const T& _value) : std::vector(_count, _value) {} - explicit xr_vector(size_t _count) : std::vector(_count) {} - u32 size() const { return (u32)std::vector::size(); } -}; - -#else // M_NOSTDCONTAINERS_EXT - -#ifdef STLPORT -namespace std -{ - template - inline xalloc<_Tp2>& __stl_alloc_rebind(xalloc<_Tp1>& __a, const _Tp2*) - { return (xalloc<_Tp2>&)(__a); } - template - inline xalloc<_Tp2> __stl_alloc_create(xalloc<_Tp1>&, const _Tp2*) - { return xalloc<_Tp2>(); } -} - -template , class _EqualKey = std::equal_to, typename allocator = xalloc> -class xr_hash_multiset : public std::hash_multiset -{ -public: - u32 size() const { return (u32) __super ::size(); } -}; - -template , class _EqualKey = std::equal_to, - typename allocator = xalloc>> -class xr_hash_map : public std::hash_map -{ -public: - u32 size() const { return (u32) __super ::size(); } -}; -template , class _EqualKey = std::equal_to, - typename allocator = xalloc>> -class xr_hash_multimap : public std::hash_multimap -{ -public: - u32 size() const { return (u32) __super ::size(); } -}; -#else #ifndef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS #define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS #endif @@ -134,9 +35,6 @@ class xr_hash_map : public stdext::hash_map public: u32 size() const { return (u32) __super ::size(); } }; -#endif // #ifdef STLPORT - -#endif // M_NOSTDCONTAINERS_EXT #include "xrCommon/predicates.h" @@ -150,5 +48,3 @@ class xr_hash_map : public stdext::hash_map #include "FixedVector.h" #include "buffer_vector.h" #include "xr_vector_defs.h" - -#endif // include guard