-
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
ccstruct: Fix Leptonica data type #848
Conversation
L_Bmf works for C++ code, but the common form is L_BMF, so use that. Signed-off-by: Stefan Weil <[email protected]>
@theraysmith, maybe you a referring to the Leptonica style guide. I think it's a style guide for the Leptonica code, not for code using Leptonica (like Tesseract). |
https://github.com/DanBloomberg/leptonica/blob/master/style-guide.txt
https://github.com/DanBloomberg/leptonica/blob/150c8d0051/src/bmf.h#L45 Since Tesseract code is based on C++, we should use a C++ style guide. |
The newer tesseract code uses the Google C++ style guide:
https://google.github.io/styleguide/cppguide.html
and we have an internal tool that reformats your code for you, hence the
occasional commit with the formatting changes.
Anyway style guide has nothing to do with using the correct name for
Leptonica classes, and Dan says we should be using Pix in C++, not PIX.
…On Fri, Apr 28, 2017 at 6:12 AM, Amit D. ***@***.***> wrote:
https://github.com/DanBloomberg/leptonica/blob/master/style-guide.txt
(c) Use typedefs for structs like Pix; e.g.,
function(PIX *pixs)
Do not do this (omitting the 'struct' keyword); it is valid C++,
but not C:
function(Pix *pixs)
https://github.com/DanBloomberg/leptonica/blob/
150c8d005132c85dac0c6388b8408a485f2b65ac/src/bmf.h#L45
Since Tesseract code is based on C++, we should use a C++ style guide.
https://google.github.io/styleguide/cppguide.html#Type_Names
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#848 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AL056YU7BU-qAN6kjGkgqqZgKgfYw9tCks5r0eWwgaJpZM4NJwso>
.
--
Ray.
|
I must admit that I'm confused now. If Dan prefers Ray, the code in |
Ray, What about adding a |
Ray reverted this pull request with commit 7a116ce. My new pull request #855 fixes the remaining exceptions which currently don't use the preferred struct name. Ray, thank you for formatting |
L_Bmf works for C++ code, but the common form is L_BMF, so use that.
Signed-off-by: Stefan Weil [email protected]