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

Don't include windows.h from platform.h #2401

Merged
merged 1 commit into from
Apr 21, 2019
Merged

Conversation

stweil
Copy link
Contributor

@stweil stweil commented Apr 21, 2019

This partially reverts commit c150b98.
Now params.cpp includes host.h which also gets the definition for MAX_PATH.

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

This partially reverts commit c150b98.
Now params.cpp includes host.h which also gets the definition for MAX_PATH.

Signed-off-by: Stefan Weil <[email protected]>
@ghost ghost assigned stweil Apr 21, 2019
@ghost ghost added the review label Apr 21, 2019
@stweil
Copy link
Contributor Author

stweil commented Apr 21, 2019

This addresses issue #2390.

@zdenop
Copy link
Contributor

zdenop commented Apr 21, 2019

Do you think it there reason to keep host.h and platform.h separated?
host.h is used only in few places:

src/ccmain/paragraphs.cpp:#include "host.h"                 // for NearlyEqual
src/ccmain/recogtraining.cpp:#include "host.h"  // for NearlyEqual
src/ccstruct/blobbox.cpp:#include "host.h"        // for NearlyEqual
src/ccstruct/blobbox.h:#include "host.h"              // for PRId32
src/ccstruct/boxword.cpp:#include "host.h"       // for NearlyEqual
src/ccstruct/imagedata.cpp:#include "host.h"        // for PRId64
src/ccstruct/ocrpara.cpp:#include "host.h"  // For NearlyEqual()
src/ccstruct/pdblock.cpp:#include "host.h"  // for PRId32
src/ccstruct/polyblk.cpp:#include "host.h"  // for PRId32
src/dict/dawg.h:#include "host.h"               // for PRId64

@zdenop zdenop merged commit c7c11f7 into tesseract-ocr:master Apr 21, 2019
@ghost ghost removed the review label Apr 21, 2019
@stweil stweil deleted the includes branch April 22, 2019 04:29
@stweil
Copy link
Contributor Author

stweil commented Apr 22, 2019

Do you think it there reason to keep host.h and platform.h separated?

Yes, see my comment.

The more difficult question is whether we may remove host.h from the 4.1 API.

@zdenop
Copy link
Contributor

zdenop commented Apr 22, 2019

Do not worry about that - I can ran abi-compliance-checker locally so I will backport all possible changes from master.

Also I found nice extension for Visual studio that eliminate not needed includes (which is based on include-what-you-use), so maybe we can better optimize includes.

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.

2 participants