Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jni/minicap/JpgEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ JpgEncoder::getEncodedData() {
bool
JpgEncoder::reserveData(uint32_t width, uint32_t height) {
if (width == mMaxWidth && height == mMaxHeight) {
return 0;
return true;
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function returns true when no reallocation is needed, but this should be verified against the function's contract. If reserveData is expected to return true for success and false for failure, then this change is correct. However, if the function should indicate whether new data was actually reserved, returning true when no allocation occurred might be misleading to callers.

Copilot uses AI. Check for mistakes.
}

tjFree(mEncodedData);
Expand Down