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

@@ -3,7 +3,7 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/AbstractLogger.hpp>
#include <Nazara/Core/StringStream.hpp>
#include <sstream>
#include <Nazara/Core/Debug.hpp>
namespace Nz
@@ -40,14 +40,14 @@ namespace Nz
* \param function Name of the function throwing the error
*/
void AbstractLogger::WriteError(ErrorType type, const String& error, unsigned int line, const char* file, const char* function)
void AbstractLogger::WriteError(ErrorType type, const std::string_view& error, unsigned int line, const char* file, const char* function)
{
StringStream stream;
stream << errorType[type] << error;
std::ostringstream ss;
ss << errorType[type] << error;
if (line != 0 && file && function)
stream << " (" << file << ':' << line << ": " << function << ')';
ss << " (" << file << ':' << line << ": " << function << ')';
Write(stream);
Write(ss.str());
}
}