diff options
| author | jackpoz <giacomopoz@gmail.com> | 2016-08-12 11:33:02 +0200 |
|---|---|---|
| committer | jackpoz <giacomopoz@gmail.com> | 2016-08-12 11:33:02 +0200 |
| commit | 194fbd17923aaca30ac0845901adab84141f8318 (patch) | |
| tree | 9f61e06951d47ba3ed29d6b2b3306d58aa70c0bc /src | |
| parent | d4f2f5968aadc5145e9a8c58dc7a4e0bd48c87e8 (diff) | |
Core/Dynamic: Reduce differences between 3.3.5 and 6.x branches
Code functionality shouldn't have been modified.
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/shared/Dynamic/TypeContainer.h | 19 | ||||
| -rw-r--r-- | src/server/shared/Dynamic/TypeContainerFunctions.h | 5 | ||||
| -rw-r--r-- | src/server/shared/Networking/AsyncAcceptor.h | 30 |
3 files changed, 19 insertions, 35 deletions
diff --git a/src/server/shared/Dynamic/TypeContainer.h b/src/server/shared/Dynamic/TypeContainer.h index 17ca8c24c43..6a01cb29309 100644 --- a/src/server/shared/Dynamic/TypeContainer.h +++ b/src/server/shared/Dynamic/TypeContainer.h @@ -47,6 +47,7 @@ template<> struct ContainerMapList<TypeNull> /* nothing is in type null */ { }; + template<class H, class T> struct ContainerMapList<TypeList<H, T> > { @@ -72,23 +73,6 @@ struct ContainerUnorderedMap<TypeList<H, T>, KEY_TYPE> ContainerUnorderedMap<T, KEY_TYPE> _TailElements; }; -/* - * @class ContainerList is a simple list of different types of elements - * - */ -template<class OBJECT> struct ContainerList -{ - OBJECT _element; -}; - -/* TypeNull is underfined */ -template<> struct ContainerList<TypeNull> { }; -template<class H, class T> struct ContainerList<TypeList<H, T> > -{ - ContainerList<H> _elements; - ContainerMapList<T> _TailElements; -}; - #include "TypeContainerFunctions.h" /* @@ -157,4 +141,3 @@ private: }; #endif - diff --git a/src/server/shared/Dynamic/TypeContainerFunctions.h b/src/server/shared/Dynamic/TypeContainerFunctions.h index c4071b76590..3f16cd09a59 100644 --- a/src/server/shared/Dynamic/TypeContainerFunctions.h +++ b/src/server/shared/Dynamic/TypeContainerFunctions.h @@ -160,7 +160,8 @@ namespace Trinity // non-const insert functions template<class SPECIFIC_TYPE> - SPECIFIC_TYPE* Insert(ContainerMapList<SPECIFIC_TYPE>& elements, SPECIFIC_TYPE* obj) { + SPECIFIC_TYPE* Insert(ContainerMapList<SPECIFIC_TYPE>& elements, SPECIFIC_TYPE* obj) + { //elements._element[hdl] = obj; obj->AddToGrid(elements._element); return obj; @@ -209,7 +210,7 @@ namespace Trinity //{ // // The head element is bad // SPECIFIC_TYPE* t = Remove(elements._elements, obj); - // return ( t != nullptr ? t : Remove(elements._TailElements, obj) ); + // return (t != nullptr ? t : Remove(elements._TailElements, obj)); //} } #endif diff --git a/src/server/shared/Networking/AsyncAcceptor.h b/src/server/shared/Networking/AsyncAcceptor.h index f68da230553..e2f4045ccff 100644 --- a/src/server/shared/Networking/AsyncAcceptor.h +++ b/src/server/shared/Networking/AsyncAcceptor.h @@ -1,19 +1,19 @@ /* -* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ #ifndef __ASYNCACCEPT_H_ #define __ASYNCACCEPT_H_ |
