-
Notifications
You must be signed in to change notification settings - Fork 564
Release: v2.49.0 #1873
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
Release: v2.49.0 #1873
Conversation
… is disabled This commit addresses an issue where the default route detection on Windows incorrectly identified a disabled adapter as the default route. Previously, when a user disabled the adapter configured as the default route, the system still reported it as active due to stale routing table entries.
sudo, you know it.
…cting scoop packages Fix #1868
It's less accurate, but higher chance to match.
1. `--<module>-space-before-unit` 2. `--duration-abbreviation` 3. various code refactoring and cleanups
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 release introduces v2.49.0 with significant enhancements across display formatting, package management, and hardware detection. The release focuses on improved consistency in unit formatting, better hardware support, and enhanced configuration options.
- Added comprehensive space-before-unit options for duration, size, frequency, temperature, and percentage values
- Enhanced package manager support with improved Scoop detection on Windows and removal of qi package manager
- Improved hardware detection including nouveau GPU driver support, ARM SoC detection, and Intel GPU temperature accuracy
Reviewed Changes
Copilot reviewed 71 out of 71 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
tests/strbuf.c | Added comprehensive tests for new ffStrbufSubstr and ffStrbufAppendUtf32CodePoint functions |
tests/duration.c | Updated to use new duration formatting API and added extensive abbreviation tests |
src/util/FFstrbuf.h | Added declarations for substring extraction and UTF-32 code point conversion functions |
src/util/FFstrbuf.c | Implemented new string manipulation functions with proper bounds checking |
src/util/FFcheckmacros.h | Enhanced macro definitions using __has_attribute for better compiler compatibility |
src/options/display.h | Added new space-before-unit configuration options for various display types |
presets/examples/25.jsonc | Enhanced documentation with detailed explanations of ANSI escape codes and formatting |
Various modules | Updated to use new common formatting functions (size, frequency, duration) for consistency |
@@ -461,6 +462,26 @@ bool ffStrbufSubstrAfterLastC(FFstrbuf* strbuf, char c) | |||
return true; | |||
} | |||
|
|||
bool ffStrbufSubstr(FFstrbuf* strbuf, uint32_t start, uint32_t end) | |||
{ | |||
if (__builtin_expect(start >= end, false)) |
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.
[nitpick] The use of __builtin_expect
for this condition seems unnecessary as start >= end is not particularly predictable and the branch misprediction cost is minimal for a simple comparison. Consider removing the hint for better code readability.
if (__builtin_expect(start >= end, false)) | |
if (start >= end) |
Copilot uses AI. Check for mistakes.
return false; | ||
} | ||
|
||
if (__builtin_expect(start == 0, false)) return ffStrbufSubstrBefore(strbuf, end); |
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.
[nitpick] The branch hint false
for start == 0
may not be accurate for all use cases. This condition could be common in many substring operations. Consider removing the hint or using a more neutral approach.
if (__builtin_expect(start == 0, false)) return ffStrbufSubstrBefore(strbuf, end); | |
if (start == 0) return ffStrbufSubstrBefore(strbuf, end); |
Copilot uses AI. Check for mistakes.
} | ||
|
||
if (__builtin_expect(start == 0, false)) return ffStrbufSubstrBefore(strbuf, end); | ||
if (__builtin_expect(end >= strbuf->length, false)) return ffStrbufSubstrAfter(strbuf, start - 1); |
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.
[nitpick] The branch hint false
for end >= strbuf->length
assumes that most substring operations don't extend to the end of the string, which may not always be true. Consider removing the hint for better maintainability.
if (__builtin_expect(end >= strbuf->length, false)) return ffStrbufSubstrAfter(strbuf, start - 1); | |
if (end >= strbuf->length) return ffStrbufSubstrAfter(strbuf, start - 1); |
Copilot uses AI. Check for mistakes.
No description provided.