inital nfc code
This commit is contained in:
@ -59,7 +59,7 @@ public:
|
||||
|
||||
bool push_back(const T in)
|
||||
{
|
||||
if( remainingCapacity() != 0)
|
||||
if(remainingCapacity() != 0)
|
||||
{
|
||||
array[stored] = in;
|
||||
++stored;
|
||||
@ -70,13 +70,13 @@ public:
|
||||
|
||||
bool erase(size_t position)
|
||||
{
|
||||
if(position > stored)
|
||||
return false;
|
||||
array[position].~T();
|
||||
--stored;
|
||||
for( size_t i = position; i < stored; i++ )
|
||||
memcpy(&array[i], &array[i+1], sizeof(T));
|
||||
return true;
|
||||
if(position > stored)
|
||||
return false;
|
||||
array[position].~T();
|
||||
--stored;
|
||||
for( size_t i = position; i < stored; i++ )
|
||||
memcpy(&array[i], &array[i+1], sizeof(T));
|
||||
return true;
|
||||
}
|
||||
|
||||
void clear()
|
||||
|
Reference in New Issue
Block a user