diff --git a/Jupiter/String.h b/Jupiter/String.h index 29d07d8..a1c2bfd 100644 --- a/Jupiter/String.h +++ b/Jupiter/String.h @@ -39,13 +39,6 @@ namespace Jupiter { public: - /** - * @brief Returns a C-Style string representation of the String. - * - * @return C-Style string representation of the String. - */ - const T *c_str() const; - /** * @brief Sets the String's contents based on the format string and input variables. * Note: Format specifiers similar to printf. Returns 0 for any type other than char and wchar_t. @@ -208,13 +201,6 @@ namespace Jupiter { public: - /** - * @brief Returns a C-Style string representation of the String. - * - * @return C-Style string representation of the String. - */ - const T *c_str() const; - /** * @brief Sets the String's contents based on the format string and input variables. * Note: Format specifiers similar to printf. Returns 0 for any type other than char and wchar_t. diff --git a/Jupiter/String_Imp.h b/Jupiter/String_Imp.h index 4a12902..99ed623 100644 --- a/Jupiter/String_Imp.h +++ b/Jupiter/String_Imp.h @@ -85,19 +85,6 @@ template Jupiter::String_Strict::String_Strict(const T *in) for (size_t index = 0; index != Jupiter::String_Type::length; index++, in++) Jupiter::String_Type::str[index] = *in; } -template const T *Jupiter::String_Strict::c_str() const -{ - static T *buff = new T[1]; - delete[] buff; - - buff = new T[Jupiter::String_Type::length + 1]; - size_t index; - for (index = 0; index < Jupiter::String_Type::length && Jupiter::String_Type::str[index] != 0; index++) buff[index] = Jupiter::String_Type::str[index]; - buff[index] = 0; - - return buff; -} - // vformat() template<> size_t inline Jupiter::String_Strict::vformat(const char *format, va_list args) @@ -325,19 +312,6 @@ template bool Jupiter::String_Loose::setBufferSizeNoCopy(size_t l return Jupiter::Shift_String_Type::setBufferSizeNoCopy(Jupiter::String_Loose::strSize = getPowerTwo32(len)); } -template const T *Jupiter::String_Loose::c_str() const -{ - static T *buff = new T[1]; - delete[] buff; - - buff = new T[Jupiter::String_Type::length + 1]; - size_t index; - for (index = 0; index < Jupiter::String_Type::length && Jupiter::String_Type::str[index] != 0; index++) buff[index] = Jupiter::String_Type::str[index]; - buff[index] = 0; - - return buff; -} - // vformat() template<> size_t inline Jupiter::String_Loose::vformat(const char *format, va_list args) diff --git a/Jupiter/String_Type.h b/Jupiter/String_Type.h index 138396b..cbd9b14 100644 --- a/Jupiter/String_Type.h +++ b/Jupiter/String_Type.h @@ -62,13 +62,6 @@ namespace Jupiter */ const T *ptr() const; - /** - * @brief Returns a C-Style string version of the String. - * - * @return C-Style string representation of the String. - */ - virtual const T *c_str() const = 0; - /** * @brief Sets the String's contents based on the format string and input variables. * Note: Format specifiers similar to printf. Returns 0 for any type other than char and wchar_t. @@ -77,7 +70,6 @@ namespace Jupiter * @param ... Inputs to match the format specifiers. * @return Number of characters written. */ - size_t format(const String_Type &format, ...); size_t format(const std::basic_string &format, ...); size_t format(const T *format, ...); virtual size_t vformat(const T *format, va_list args) = 0; @@ -90,7 +82,6 @@ namespace Jupiter * @param ... Inputs to match the format specifiers. * @return Number of characters written. */ - size_t aformat(const String_Type &format, ...); size_t aformat(const std::basic_string &format, ...); size_t aformat(const T *format, ...); virtual size_t avformat(const T *format, va_list args) = 0; diff --git a/Jupiter/String_Type_Imp.h b/Jupiter/String_Type_Imp.h index 8b38128..636ba44 100644 --- a/Jupiter/String_Type_Imp.h +++ b/Jupiter/String_Type_Imp.h @@ -57,16 +57,6 @@ template const T *Jupiter::String_Type::ptr() const // format forwards -template size_t Jupiter::String_Type::format(const String_Type &format, ...) -{ - size_t r; - va_list args; - va_start(args, format); - r = this->vformat(format.c_str(), args); - va_end(args); - return r; -} - template size_t Jupiter::String_Type::format(const std::basic_string &format, ...) { size_t r; @@ -89,16 +79,6 @@ template size_t Jupiter::String_Type::format(const T *format, ... // aformat forwards -template size_t Jupiter::String_Type::aformat(const String_Type &format, ...) -{ - size_t r; - va_list args; - va_start(args, format); - r = this->avformat(format.c_str(), args); - va_end(args); - return r; -} - template size_t Jupiter::String_Type::aformat(const std::basic_string &format, ...) { size_t r; diff --git a/Release/Jupiter.lib b/Release/Jupiter.lib index b9eb1d8..7773db4 100644 Binary files a/Release/Jupiter.lib and b/Release/Jupiter.lib differ