-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Cli reader options #1860
base: master
Are you sure you want to change the base?
Cli reader options #1860
Conversation
You are modifying libf3d public API! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1860 +/- ##
=======================================
Coverage 95.59% 95.59%
=======================================
Files 125 125
Lines 10013 10015 +2
=======================================
+ Hits 9572 9574 +2
Misses 441 441 ☔ View full report in Codecov by Sentry. |
library/src/factory.cxx.in
Outdated
@@ -49,7 +49,11 @@ reader* factory::getReader(const std::string& fileName) | |||
{ | |||
for (auto r : p->getReaders()) | |||
{ | |||
if (r->getScore() > bestScore && r->canRead(fileName)) | |||
if (forceReader.has_value() && r->getName() == *forceReader) |
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.
if (forceReader.has_value() && r->getName() == *forceReader) | |
if (forceReader.has_value() && r->getName() == forceReader.value()) |
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.
Just wondering, since we already check has_value(), should I still switch to forceReader.value() even though it adds a bit of overhead?
application/F3DOptionsTools.cxx
Outdated
@@ -65,6 +65,7 @@ static inline const std::array<CLIGroup, 8> CLIOptions = {{ | |||
{ "no-background", "", "No background when render to file", "<bool>", "1" }, | |||
{ "help", "h", "Print help", "", "" }, { "version", "", "Print version details", "", "" }, | |||
{ "list-readers", "", "Print the list of readers", "", "" }, | |||
{"force-reader", "", "Enforce a specific reader", "<reader>", "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.
please add an application test
Added a CLI reader option #1735