refactor(core/rendering): esborrar codi mort de Text (DEAD-01 + DEAD-02)

Eliminats cinc mètodes sense callers externs:

- writeShadowed / writeCentered: la funcionalitat viu a writeDX(flags,
  ...) que és l'API reutilitzable; ningú crida aquestes variants
  discretes.
- glyphWidth / getGlyphClip: getters per glif no consumits enlloc.
- codepointToUtf8: helper de serialització UTF-8 no consumit (només es
  consumeix el parser nextCodepoint, que queda).

Build + smoke 5s xvfb OK (exit 124).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
JailDesignerandClaude Opus 4.7 committed 2026-04-20 09:40:54 +02:00
1 parent 81fe826d17
commit b51109e380
3 files changed
+4 -55

No files matched your search

-6
View File
@@ -54,8 +54,6 @@ class Text {
void write(int x, int y, const std::string& text, int kerning = 1, int length = -1);
void writeColored(int x, int y, const std::string& text, Uint8 color, int kerning = 1, int length = -1);
void writeShadowed(int x, int y, const std::string& text, Uint8 color, Uint8 shadow_distance = 1, int kerning = 1, int length = -1);
void writeCentered(int x, int y, const std::string& text, int kerning = 1, int length = -1);
void writeDX(Uint8 flags, int x, int y, const std::string& text, int kerning = 1, Uint8 text_color = 0, Uint8 shadow_distance = 1, Uint8 shadow_color = 0, int length = -1);
// Dibuixa amb amplada fixa només per als dígits '0'-'9' (cadascun centrat
@@ -66,12 +64,8 @@ class Text {
[[nodiscard]] auto length(const std::string& text, int kerning = 1) const -> int;
[[nodiscard]] auto lengthMonoDigits(const std::string& text, int digit_cell_w, int kerning = 1) const -> int;
[[nodiscard]] auto getCharacterSize() const -> int { return box_width_; }
[[nodiscard]] auto glyphWidth(std::uint32_t codepoint, int kerning = 0) const -> int;
[[nodiscard]] auto getGlyphClip(std::uint32_t codepoint) const -> SDL_FRect;
[[nodiscard]] auto getSprite() const -> Sprite* { return sprite_.get(); }
static auto loadTextFile(const std::string& file_path) -> std::shared_ptr<File>;
static auto codepointToUtf8(std::uint32_t cp) -> std::string;
static auto nextCodepoint(const std::string& s, std::size_t& pos) -> std::uint32_t;
private: