Skip to content

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented Jun 27, 2025

No description provided.

@neheb neheb requested review from kmilos and Copilot June 27, 2025 20:27
Copy link

@Copilot Copilot AI left a 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 PR simplifies various ostream printing routines by replacing legacy formatting code with concise stringFormat invocations while adding an include for image_int.hpp.

  • Simplifies prints for rational values and flash compensation formatting.
  • Uses new macros (EXV_PRINT_TAG, EXV_PRINT_TAG_BITMASK) to replace custom tag printing helper calls.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/tags_int.cpp Added image_int.hpp include and refactored several print functions.
src/olympusmn_int.cpp Replaced direct tag printing calls with a macro for improved clarity.
src/nikonmn_int.cpp Streamlined print functions with early returns and stringFormat usage.
Comments suppressed due to low confidence (1)

src/tags_int.cpp:3025

  • The condition compares 'distance.first' against 0xfffffff; this appears to be a typo, as the original constant was 0xffffffff. Please verify the intended value.
  if (static_cast<uint32_t>(distance.first) == 0xfffffff)

@neheb
Copy link
Collaborator Author

neheb commented Jun 27, 2025

wow that is a subtle bug...

@neheb neheb force-pushed the win branch 2 times, most recently from 204d787 to e13602f Compare June 27, 2025 20:36
@neheb neheb requested a review from kevinbackhouse August 1, 2025 20:01
Comment on lines +3478 to +3485
if (value.count() != 1 || value.typeId() != unsignedByte)
return os << "(" << value << ")";
return EXV_PRINT_TAG(nikonFlashControlMode)(os, (value.toUint32() & 0x0F), metadata);
Copy link
Collaborator

Choose a reason for hiding this comment

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

The code that saves and restores the flags has been removed. The same thing has happened in many other places in this pull request. Is there some reason why that code is not needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In a lot of places, I’m using string format, which doesn’t need this.

@neheb
Copy link
Collaborator Author

neheb commented Sep 6, 2025

Fixed bug with fmt < 8.

neheb added 2 commits October 6, 2025 16:38
compilation issue was discovered and fixed.

Signed-off-by: Rosen Penev <[email protected]>
neheb added 2 commits October 6, 2025 17:09
Simplifies code slightly.

Signed-off-by: Rosen Penev <[email protected]>
Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 57.92350% with 154 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.98%. Comparing base (1cb11d8) to head (2750eec).
⚠️ Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
src/nikonmn_int.cpp 44.15% 49 Missing and 37 partials ⚠️
src/sonymn_int.cpp 68.85% 25 Missing and 32 partials ⚠️
src/tags_int.cpp 57.14% 4 Missing and 5 partials ⚠️
src/datasets.cpp 80.00% 1 Missing ⚠️
src/olympusmn_int.cpp 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3298      +/-   ##
==========================================
- Coverage   64.09%   63.98%   -0.12%     
==========================================
  Files         103      103              
  Lines       21696    21435     -261     
  Branches    10645    10604      -41     
==========================================
- Hits        13907    13715     -192     
+ Misses       5572     5507      -65     
+ Partials     2217     2213       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants