diff --git a/headers/build/os/support/StackOrHeapArray.h b/headers/build/os/support/StackOrHeapArray.h index 45049a4129..9fd91ed3d7 100644 --- a/headers/build/os/support/StackOrHeapArray.h +++ b/headers/build/os/support/StackOrHeapArray.h @@ -1,43 +1 @@ -/* - * Copyright 2012, Jonathan Schleifer . All Rights Reserved. - * Distributed under the terms of the MIT License. - */ -#ifndef _SUPPORT_STACKORHEAPARRAY_H -#define _SUPPORT_STACKORHEAPARRAY_H - -#include -#include - -template -class BStackOrHeapArray { -public: - BStackOrHeapArray(size_t count) - { - if (count > StackSize) - fData = new(std::nothrow) Type[count]; - else - fData = fStackData; - } - - ~BStackOrHeapArray() - { - if (fData != fStackData) - delete[] fData; - } - - bool IsValid() const - { - return fData != NULL; - } - - operator Type*() - { - return fData; - } - -private: - Type fStackData[StackSize]; - Type* fData; -}; - -#endif +#include <../os/support/StackOrHeapArray.h>