RobLoach / RobLoach/raylib-libretro

Games DB: return const pointers from read-only view/query accessors

Open Beginner friendly
#331 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
38
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Surfaced by a games-DB design review (adversarially verified against source). Cosmetic/defensive, low severity.

LibretroGamesFilteredEntry() and LibretroGamesSystem() (include/raylib-libretro-games.h) hand out non-const pointers into internal cvector storage; the only consumer (the menu) just reads them. Returning const LibretroGameEntry* / const LibretroGameSystem* documents the borrow and matches the file’s sibling accessors, which already return const (LibretroGamesFilteredLabel, LibretroGamesContentDir, the system-string getters). Update the three menu locals to const; nothing mutates, so nothing breaks. Not a bug fix — local const-consistency only.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in include/raylib-libretro-games.h and compare LibretroGamesFilteredEntry() and LibretroGamesSystem() with the sibling const accessors. Inspect their menu call sites and update the three locals to const; done means the accessors return const pointers and the menu remains read-only and builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.