Feat: Misc Update#423
Merged
Merged
Conversation
- drop the obsolete Windows long-path notice (qt recipe now ships prebuilt binaries, so the build tree no longer overflows) - add Linux to the supported platform/toolchain/generator table - list Google Benchmark under third party usage - remove the sponsor section and bump the license year to 2026
Introduce Common/Result.h: a Result<T, E> holding either an Ok value or an Err error, built via the Ok()/Err() helpers (Result<void, E> mirrors Rust's Result<(), E>). Provides the usual accessors and combinators: Value/Error, Unwrap/UnwrapErr, Expect/ExpectErr, UnwrapOr/UnwrapOrElse, Map/MapErr, AndThen/OrElse and ToOptional. Replace the ad-hoc std::pair<bool, ...> error results that were really Result-shaped with it, and update all call sites and tests: - MirrorTool::Parser -> Result<MetaInfo, std::string> - MirrorTool::Generator -> Result<void, std::string> - Core::Cli::Parse -> Result<void, std::string>
Change FileUtils::ReadTextFile/WriteTextFile/ReadJsonFile/WriteJsonFile to return Result<..., std::string> so callers can handle IO failures instead of the functions hard-asserting (or, for ReadJsonFile, silently passing a null FILE* into rapidjson and crashing). ReadJsonFile now also reports fopen failures and JSON parse errors as Err. Update all call sites (Serialization, Render, Core, Runtime, Editor, Sample) to the new signatures, and cover the error path with new FileTest cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.