Remove Nz::String and Nz::StringStream

This commit is contained in:
Jérôme Leclercq
2020-09-25 19:31:01 +02:00
parent d665af1f9d
commit 2b6a463a45
212 changed files with 1877 additions and 8721 deletions

View File

@@ -5,6 +5,7 @@
#include <Nazara/Math/Angle.hpp>
#include <algorithm>
#include <cstring>
#include <sstream>
#ifdef NAZARA_PLATFORM_POSIX
#include <math.h> //< sincos
@@ -51,11 +52,6 @@ namespace Nz
return DegreeToRadian(degrees);
}
template<typename T> static String ToString(T value)
{
return "Angle(" + String::Number(value) + "deg)";
}
template<typename T> static std::ostream& ToString(std::ostream& out, T value)
{
return out << "Angle(" << value << "deg)";
@@ -95,11 +91,6 @@ namespace Nz
return radians;
}
template<typename T> static String ToString(T value)
{
return "Angle(" + String::Number(value) + "rad)";
}
template<typename T> static std::ostream& ToString(std::ostream& out, T value)
{
return out << "Angle(" << value << "rad)";
@@ -358,9 +349,12 @@ namespace Nz
* \return String representation of the angle
*/
template<AngleUnit Unit, typename T>
String Angle<Unit, T>::ToString() const
std::string Angle<Unit, T>::ToString() const
{
return Detail::AngleUtils<Unit>::ToString(value);
std::ostringstream oss;
Detail::AngleUtils<Unit>::ToString(oss, value);
return oss.str();
}
/*!