1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2024-11-29 01:33:46 +00:00

Move MaxSizedArray to helpers include dir.

This commit is contained in:
King_DuckZ 2016-05-23 10:06:59 +02:00
parent b6d45eee3c
commit baa67138eb
6 changed files with 15 additions and 13 deletions

View file

@ -18,15 +18,15 @@
#ifndef idBC9F804ADD33468A9C7657E823FFC706
#define idBC9F804ADD33468A9C7657E823FFC706
#include "AutomemBase.hpp"
#include "IteratorOnPtr.hpp"
#include "implem/AutomemBase.hpp"
#include "implem/IteratorOnPtr.hpp"
#include <memory>
#include <cstddef>
#include <type_traits>
#include <cassert>
#include <utility>
namespace din {
namespace dinhelp {
const size_t MAXSZARR_MAX_STACK_ALLOC_SIZE = MAX_STACK_ALLOC_SIZE;
//TODO: add a template parameter to force stack allocation regardless of
@ -107,7 +107,7 @@ namespace din {
T* m_localMem; //A copy of memory pointer is required
size_type m_used;
};
} //namespace din
} //namespace dinhelp
#include "MaxSizedArray.inl"

View file

@ -15,7 +15,7 @@
* along with "dindexer". If not, see <http://www.gnu.org/licenses/>.
*/
namespace din {
namespace dinhelp {
///-------------------------------------------------------------------------
///-------------------------------------------------------------------------
template <typename T, size_t S, typename A>
@ -278,4 +278,4 @@ namespace din {
throw std::length_error("Unable to reserve more memory than the build-time size for MaxSizedArray");
}
}
} //namespace din
} //namespace dinhelp

View file

@ -30,7 +30,7 @@
# define ASSERTIONSENABLED
#endif
namespace din {
namespace dinhelp {
const size_t MAX_STACK_ALLOC_SIZE = 128;
///-------------------------------------------------------------------------
@ -81,7 +81,7 @@ namespace din {
void operator= (const AutomemRawBase_stack&);
typename std::aligned_storage<sizeof(T), alignof(T)>::type m_localMem[S];
};
} //namespace din
} //namespace dinhelp
#include "AutomemBase.inl"

View file

@ -15,7 +15,7 @@
* along with "dindexer". If not, see <http://www.gnu.org/licenses/>.
*/
namespace din {
namespace dinhelp {
namespace {
#if defined(ASSERTIONSENABLED)
const char g_guard = 0xAB;
@ -115,4 +115,4 @@ namespace din {
#endif
return new(location) T(std::forward<Args...>(parArgs)...);
}
} //namespace din
} //namespace dinhelp

View file

@ -23,7 +23,7 @@
#include <type_traits>
#include <cassert>
namespace din {
namespace dinhelp {
namespace implem_iop {
template <typename P, typename T, int32_t I>
class IteratorOnPtr_base : public std::iterator<std::random_access_iterator_tag, T> {
@ -309,6 +309,6 @@ namespace din {
this->MoveIterator(-parOther);
return *this;
}
} //namespace din
} //namespace dinhelp
#endif

View file

@ -20,7 +20,7 @@
#include "dindexer-machinery/recorddata.hpp"
#include "flatinsertin2dlist.hpp"
#include "MaxSizedArray.hpp"
#include "helpers/MaxSizedArray.hpp"
#include <memory>
#include <cstdint>
#include <vector>
@ -40,6 +40,8 @@ namespace pq {
} //namespace pq
namespace din {
using dinhelp::MaxSizedArray;
enum SetDetails {
SetDetail_Desc = 0x01,
SetDetail_Type = 0x02,