-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/no sscanf #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…can be read successfully
… case insensitive string comparison of the section and key names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request refactors the RUL0 parser to eliminate sscanf usage and replace it with modern C++ parsing utilities using std::from_chars. The changes also introduce case-insensitive key comparisons for INI file parsing and add comment-stripping functionality.
Key changes:
- Replaced
sscanfcalls with custom parsing functions (ParseIntAuto,ParseInt,ParseFloat,ParseHex,ParseIntPair) - Implemented case-insensitive string comparison for INI key matching
- Added support for inline comments in piece value parsing
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/RUL0.h | Added kCommentPrefix constant and corrected key names from "Id" to "ID" suffix |
| src/RUL0.cpp | Replaced sscanf with std::from_chars-based parsers, added case-insensitive comparisons, improved string handling |
| CMakeLists.txt | Added INI_MAX_LINE=1000 compile definition for the library |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.