Skip to content
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

Merged
merged 1 commit into from
Apr 27, 2017
Merged

Conversation

stweil
Copy link
Member

@stweil stweil commented Apr 27, 2017

L_Bmf works for C++ code, but the common form is L_BMF, so use that.

Signed-off-by: Stefan Weil [email protected]

L_Bmf works for C++ code, but the common form is L_BMF, so use that.

Signed-off-by: Stefan Weil <[email protected]>
@zdenop zdenop merged commit 394162e into tesseract-ocr:master Apr 27, 2017
@stweil stweil deleted the lept branch April 27, 2017 07:16
@stweil
Copy link
Member Author

stweil commented Apr 28, 2017

@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).

@amitdo
Copy link
Collaborator

amitdo commented Apr 28, 2017

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/150c8d0051/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

@theraysmith
Copy link
Contributor

theraysmith commented Apr 28, 2017 via email

@stweil
Copy link
Member Author

stweil commented Apr 28, 2017

I must admit that I'm confused now. If Dan prefers Pix, I'd change the Leptonica to allow Pix for C as well (and maintain PIX for backward compatibility, maybe with a deprecation attribute).

Ray, the code in opencl/ needs much formatting. Could you do this with your internal tool (or make it public, then I could assist)?

@amitdo
Copy link
Collaborator

amitdo commented Apr 28, 2017

Ray,
According to some of your commit messages you use clang-tidy.

What about adding a .clang-format file to the public repo?
https://clang.llvm.org/docs/ClangFormatStyleOptions.html

@stweil
Copy link
Member Author

stweil commented Apr 30, 2017

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 opencl/. I noticed that some issues like There is never a space between the parentheses and the parameters were not fixed (see also issue #854).

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.

5 participants