-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Added USING_STD_NAMESPACE macro to text module #1337
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
Conversation
@@ -48,6 +48,9 @@ | |||
#include "text_config.hpp" | |||
|
|||
#ifdef HAVE_TESSERACT | |||
#if !defined(USE_STD_NAMESPACE) | |||
#define USE_STD_NAMESPACE |
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.
There are no mentions of this macro in the Opencv code? Why do you need this?
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.
I think problem is explained here
Problem is : at line using tesseract 4.00.0alpha
I don't understand problem at line there is a std:: before vector but no std before string.
Using std::string does not comply with Google's coding conventions.
I don't think macro is good idea but problem must be solved.
@fifothekid if you need tesseract now insert std before string and problem is solved
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.
@LaurentBerger exactly
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.
@LaurentBerger, using that macro is the new correct way to solve the problem with string
. I'm afraid that Google's coding conventions are something which we cannot change. The usage of std::
is inconsistent, yes.
In addition to the macro, I'd also add a comment which explains why the macro is needed. Maybe some day it won't be needed any more.
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.
@fifothekid argee, comment is needed here and eliminate merge commit please.
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.
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.
@LaurentBerger Thanks man, your code worked like a charm.
@LaurentBerger they simply don't accept adding std:: before string and what you said makes sense |
👍 |
Tesseract is now at beta 1 stage. This version uses std:string everywhere. |
resolves #1324
Added USING_STD_NAMESPACE macro since "-DUSING_STD_NAMESPACE is now needed for all of the tesseract library, not just for training."