First include and library cleanup round.
ClosedPublic

Authored by stefanobonicatti on Jan 27 2016, 10:51 PM.

Details

Summary

This is a first round by looking at all the headers of the flake, basicflakes, odf pigment library and also lcms2engine plugin.
No cpp has been looked for improvement, i've only added the includes needed to compile.

There is also a small change to the library dependency for lcms2engine which halves the compiling time of the lib, due to linking to a lighter dependendancy.

I've put it here so we can keep track of the changes.. and to see if you find anything wrong about it.

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
stefanobonicatti retitled this revision from to First include and library cleanup round..
stefanobonicatti updated this object.
stefanobonicatti edited the test plan for this revision. (Show Details)
stefanobonicatti set the repository for this revision to R37 Krita.
stefanobonicatti added a project: Krita.
Restricted Application added a subscriber: woltherav. · View Herald TranscriptJan 27 2016, 10:51 PM
stefanobonicatti added a task: Restricted Maniphest Task.Jan 27 2016, 10:52 PM
rempt edited edge metadata.Jan 28 2016, 7:30 AM

Looks good, but maybe a bit too rigorous:

[ 14%] Building CXX object libs/flake/CMakeFiles/kritaflake.dir/svg/SvgParser.cpp.o
/Users/boud/dev/krita/libs/flake/svg/SvgParser.cpp:614:30: error: use of undeclared identifier 'floor'

fx = floor(fx);
     ^

/Users/boud/dev/krita/libs/flake/svg/SvgParser.cpp:616:30: error: use of undeclared identifier 'ceil'

fx = ceil(fx);
     ^

/Users/boud/dev/krita/libs/flake/svg/SvgParser.cpp:620:30: error: use of undeclared identifier 'floor'

fy = floor(fy);
     ^

/Users/boud/dev/krita/libs/flake/svg/SvgParser.cpp:622:30: error: use of undeclared identifier 'ceil'

fy = ceil(fy);
     ^

4 errors generated.
make[2]: *** [libs/flake/CMakeFiles/kritaflake.dir/svg/SvgParser.cpp.o] Error 1

(On OSX)

abrahams edited edge metadata.EditedJan 28 2016, 2:54 PM

Just change those to std::ceil, std::floor?

stefanobonicatti added a comment.EditedJan 28 2016, 10:40 PM

Just change those to std::ceil, std::floor?

But i also think that there's no header that includes <cmath> between all of them (or well, on Linux someone is including it, maybe Qt headers..).
A side note is that we might want to switch the few math.h includes we have to <cmath>.

stefanobonicatti edited edge metadata.

Added the necessary includes to have Windows compile.

Removed the template argument forward declarations of Qt containers and argument passed to base class as pointer.

Fixed OSX floor/ceil functions issue by switching to c++ floor/ceil functions and including <cmath>.

rempt resigned from this revision.Jan 30 2016, 12:04 PM
rempt removed a reviewer: rempt.

works on linux for me; if you tested on Windows, please push.

abrahams accepted this revision.Jan 30 2016, 2:19 PM
abrahams edited edge metadata.

Builds fine on Windows!

This revision is now accepted and ready to land.Jan 30 2016, 2:19 PM
This revision was automatically updated to reflect the committed changes.