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

@@ -14,7 +14,7 @@
#include <iostream>
#include <sstream>
void printCap(std::ostream& o, const Nz::String& cap, bool b);
void printCap(std::ostream& o, const std::string& cap, bool b);
int main()
{
@@ -65,7 +65,7 @@ int main()
Nz::File reportFile("HardwareInfo.txt");
if (reportFile.Open(Nz::OpenMode_Text | Nz::OpenMode_Truncate | Nz::OpenMode_WriteOnly))
{
reportFile.Write(oss.str()); // Conversion implicite en Nz::String
reportFile.Write(oss.str()); // Conversion implicite en std::string
reportFile.Close();
char accentAigu = static_cast<char>(130); // C'est crade, mais ça marche chez 95% des Windowsiens
@@ -79,7 +79,7 @@ int main()
return 0;
}
void printCap(std::ostream& o, const Nz::String& cap, bool b)
void printCap(std::ostream& o, const std::string& cap, bool b)
{
if (b)
o << cap << ": Oui" << std::endl;

View File

@@ -166,7 +166,7 @@ int main()
{
const Nz::ParameterList& matData = mesh->GetMaterialData(i);
Nz::String data;
std::string data;
if (!matData.GetStringParameter(Nz::MaterialData::FilePath, &data))
data = "<Custom>";

View File

@@ -25,7 +25,7 @@ int main()
meshParams.matrix = Nz::Matrix4f::Rotate(Nz::EulerAnglesf(0.f, 90.f, 180.f)) * Nz::Matrix4f::Scale(Nz::Vector3f(0.002f));
meshParams.vertexDeclaration = Nz::VertexDeclaration::Get(Nz::VertexLayout_XYZ_Normal_UV);
Nz::String windowTitle = "Render Test";
std::string windowTitle = "Render Test";
if (!window.Create(Nz::VideoMode(800, 600, 32), windowTitle))
{
std::cout << "Failed to create Window" << std::endl;
@@ -341,7 +341,7 @@ int main()
if (secondClock.GetMilliseconds() >= 1000) // Toutes les secondes
{
// Et on insère ces données dans le titre de la fenêtre
window.SetTitle(windowTitle + " - " + Nz::String::Number(fps) + " FPS");
window.SetTitle(windowTitle + " - " + Nz::NumberToString(fps) + " FPS");
/*
Note: En C++11 il est possible d'insérer de l'Unicode de façon standard, quel que soit l'encodage du fichier,