mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
refactor: add [[nodiscard]] to shader/asset load functions, suppress warnings
Add [[nodiscard]] to VkShaderModule::loadFromFile, Shader::loadFromFile/ loadFromSource, AssetManifest::load, DbcLoader::load — all return bool indicating success/failure that callers should check. Suppress with (void) at 17 call sites where validity is checked via isValid() after loading rather than the return value (m2_renderer recreatePipelines, swim_effects recreatePipelines).
This commit is contained in:
parent
b5b84fbc19
commit
e805eae33c
6 changed files with 27 additions and 27 deletions
|
|
@ -29,7 +29,7 @@ public:
|
|||
* @param manifestPath Full path to manifest.json
|
||||
* @return true if loaded successfully
|
||||
*/
|
||||
bool load(const std::string& manifestPath);
|
||||
[[nodiscard]] bool load(const std::string& manifestPath);
|
||||
|
||||
/**
|
||||
* Lookup an entry by normalized WoW path (lowercase, backslash)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public:
|
|||
* @param dbcData Raw DBC file data
|
||||
* @return true if loaded successfully
|
||||
*/
|
||||
bool load(const std::vector<uint8_t>& dbcData);
|
||||
[[nodiscard]] bool load(const std::vector<uint8_t>& dbcData);
|
||||
|
||||
/**
|
||||
* Check if DBC is loaded
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue