-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Modernize datadir #4372
base: main
Are you sure you want to change the base?
Modernize datadir #4372
Conversation
zdenop
commented
Dec 18, 2024
- use std::filesystem::path instead of std::string for datadir
- add warning if datadir is not directory or does not exists
…g because it points at a temporary instance that was destroyed.`)
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.
Probably all is_directory() checks are unnecessary. User will just get any other random error if he points to a file instead of to a dir.
@stweil : Thank you for review. Unittests needs be fixed yet. |
Old tprintfs should be removed slowly in favor of std::format. |
Signed-off-by: Stefan Weil <[email protected]>
Isn't the tesserr stream even better? |
Streams are better than tprintf.
compared to
Having even more insertion points the original string can be hardly readable compared to a string with |
I mean with |
I've slightly updated |
Now I get numerous compiler warnings:
And the code size is larger, too. |
|
Can you try changing it to
? |
The suggested change still produces the compiler warnings, but I think it improves the code because like that calling |
It will be an error too if we call
|
Added format in d95e9f7 I'll check ci for other warnings. |
I don't see warnings on gcc-14 (even without format). Possible solution is
|