Browse Source

Added erase() to TokenizeResult.

release/0.19
JustinAJ 9 years ago
parent
commit
7e16ef2400
  1. 5
      Jupiter/Readable_String.h
  2. 9
      Jupiter/Readable_String_Imp.h
  3. BIN
      Release/Jupiter.lib

5
Jupiter/Readable_String.h

@ -337,6 +337,11 @@ namespace Jupiter
*/
const R<T> &getToken(size_t index) const;
/**
* @brief Restores the TokenizeResult to a default state, by deleting the stored tokens.
*/
void erase();
/**
* @brief Default constructor for the TokenizeResult class.
* Note: 'tokens' assigned nullptr, and 'token_count' is assigned 0.

9
Jupiter/Readable_String_Imp.h

@ -1353,6 +1353,15 @@ template<typename T> template<template<typename> class R> const R<T> &Jupiter::R
return R<T>::empty;
}
template<typename T> template<template<typename> class R> void Jupiter::Readable_String<T>::TokenizeResult<R>::erase()
{
if (Jupiter::Readable_String<T>::TokenizeResult<R>::tokens != nullptr)
{
delete[] Jupiter::Readable_String<T>::TokenizeResult<R>::tokens;
Jupiter::Readable_String<T>::TokenizeResult<R>::token_count = 0;
}
}
// TokenizeResult Operators
template<typename T> template<template<typename> class R> inline typename Jupiter::Readable_String<T>::TokenizeResult<R> &Jupiter::Readable_String<T>::TokenizeResult<R>::operator=(typename const Jupiter::Readable_String<T>::TokenizeResult<R> &right)

BIN
Release/Jupiter.lib

Binary file not shown.
Loading…
Cancel
Save