Quitados todos los printf menos uno

This commit is contained in:
2022-10-30 22:48:50 +01:00
parent 531ac94bc0
commit 2e0b0f32b5
7 changed files with 49 additions and 53 deletions

View File

@@ -1,4 +1,5 @@
#include "asset.h"
#include <iostream>
// Constructor
Asset::Asset(std::string path)
@@ -31,7 +32,7 @@ std::string Asset::get(std::string text)
}
}
printf("Warning: file %s not found\n", text.c_str());
std::cout << "Warning: file " << text.c_str() << " not found" << std::endl;
return "";
}
@@ -40,7 +41,7 @@ bool Asset::check()
{
bool success = true;
printf("\n** Checking files.\n");
std::cout << "\n** Checking files." << std::endl;
// Comprueba la lista de ficheros clasificandolos por tipo
for (int type = 0; type < t_maxAssetType; ++type)
@@ -59,7 +60,7 @@ bool Asset::check()
// Si hay ficheros de ese tipo, comprueba si existen
if (any)
{
printf("\n>> %s FILES\n", getTypeName(type).c_str());
std::cout << "\n>> " << getTypeName(type).c_str() << " FILES" << std::endl;
for (auto f : fileList)
{
@@ -74,11 +75,13 @@ bool Asset::check()
// Resultado
if (success)
{
printf("\n** All files OK.\n\n");
std::cout << "\n** All files OK.\n"
<< std::endl;
}
else
{
printf("\n** A file is missing. Exiting.\n\n");
std::cout << "\n** A file is missing. Exiting.\n"
<< std::endl;
}
return success;