From 44cd0857e055c56b0054cb72ee975e8552d3dbd3 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Thu, 18 Dec 2025 13:04:15 +0100 Subject: [PATCH] fix(shape_loader): corregir inconsistencias de naming y static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renombrar getCacheSize() → get_cache_size() (match con .hpp) - Renombrar resolvePath() → resolve_path() (match con .hpp) - Cambiar base_path → base_path_ (match con .hpp) - Eliminar 'static' de definiciones fuera de clase (error de C++) --- source/core/graphics/shape_loader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/core/graphics/shape_loader.cpp b/source/core/graphics/shape_loader.cpp index 5dbcb8e..52edb09 100644 --- a/source/core/graphics/shape_loader.cpp +++ b/source/core/graphics/shape_loader.cpp @@ -11,9 +11,9 @@ namespace Graphics { // Inicialització de variables estàtiques std::unordered_map> ShapeLoader::cache_; -std::string ShapeLoader::base_path = "data/shapes/"; +std::string ShapeLoader::base_path_ = "data/shapes/"; -static std::shared_ptr ShapeLoader::load(const std::string& filename) { +std::shared_ptr ShapeLoader::load(const std::string& filename) { // Check cache first auto it = cache_.find(filename); if (it != cache_.end()) { @@ -66,9 +66,9 @@ void ShapeLoader::clear_cache() { cache_.clear(); } -size_t ShapeLoader::getCacheSize() { return cache_.size(); } +size_t ShapeLoader::get_cache_size() { return cache_.size(); } -static std::string ShapeLoader::resolvePath(const std::string& filename) { +std::string ShapeLoader::resolve_path(const std::string& filename) { // Si és un path absolut (comença amb '/'), usar-lo directament if (!filename.empty() && filename[0] == '/') { return filename;