refactor(log): migra els subsistemes restants i elimina iostream
Acaba la migració dels std::cout/cerr a Log::*:
- core/locale, core/ui/ui_config, core/rendering/{screen,text,gif,
surface, sprite/animated_sprite, sdl3gpu/*}.
- game/{options, debug_config, editor/editor_config, levels/level_manager,
map/{map,tilemap,paint_layer}, entities/entity_manager_loadlevel}.
Severitats coherents: warns per a configs absents amb fallback,
errors per a YAML malformat o E/S fallida, infos per a estats.
Resultat:
- 0 occurrences de std::cout/std::cerr a source/.
- Cap #include <iostream> orfà (eliminat de surface.cpp).
- Output funcional idèntic al històric; AEE_LOG filtra (ex.
`AEE_LOG=warn` només mostra warnings, `AEE_LOG=*:warn,Tag:info`
combina globals i overrides).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5fce52e0ad
commit
c8882a3f6e
17 files changed
+83
-101
No files matched your search
@@ -3,7 +3,6 @@
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
@@ -11,6 +10,7 @@
|
||||
#include "core/rendering/sprite/sprite.hpp"
|
||||
#include "core/rendering/surface.hpp"
|
||||
#include "core/resources/resource_helper.hpp"
|
||||
#include "utils/log.hpp"
|
||||
#include "utils/utils.hpp"
|
||||
|
||||
// Decodifica el pròxim codepoint UTF-8 de la cadena i avança 'pos' al byte
|
||||
@@ -55,7 +55,7 @@ auto Text::loadTextFile(const std::string& file_path) -> std::shared_ptr<File> {
|
||||
|
||||
auto file_data = Resource::Helper::loadFile(file_path);
|
||||
if (file_data.empty()) {
|
||||
std::cerr << "Error: Fitxer no trobat " << getFileName(file_path) << '\n';
|
||||
Log::error("Text File", "fitxer no trobat: {}", getFileName(file_path));
|
||||
throw std::runtime_error("Fitxer no trobat: " + getFileName(file_path));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user