This is the first step of porting away from using quint64 as Document id
and turning it into a class.
It is done by find/replace quint64 and adding #include "idutils.h" until it compiled
adridg |
Baloo | |
Frameworks |
This is the first step of porting away from using quint64 as Document id
and turning it into a class.
It is done by find/replace quint64 and adding #include "idutils.h" until it compiled
make test
No Linters Available |
No Unit Test Coverage |
This gives a bunch of warnings like
src/engine/idutils.h:48:43: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] return *(reinterpret-cast<DocId*>(arr));
Were these before...?
I haven't seen those. I wouldn't have submitted it otherwise. I'll have a look, what this means.
src/engine/idutils.h | ||
---|---|---|
49 | @alexeymin: This will become return DocumentId(devId, inode); The warning should be gone after that. |
Nice job, looks good. No compilation warnings for me, no test failures, and all functionality that I tested still works. I found a few minor formatting issues; see the below comments.
src/engine/idtreedb.cpp | ||
---|---|---|
80 | Unintentional indentation? | |
src/file/extractor/result.h | ||
44 | Can we #include "idutils.h" on this file too, so we don't have to use the Baloo:: namespace prefix here and in the implementation file? | |
src/tools/balooshow/main.cpp | ||
114 | Ditto. |
@alexeymin , @ngraham: I asked IRC:kdevelop how to turn -Wstrict-aliasing on and was pointed to cmake docs. If this setting is defined in one of the cmake-files, why do they differ? Could it be an internal setting of the IDE? I'm using KDevelop and there seems to be no option to switch that on.
src/engine/idtreedb.cpp | ||
---|---|---|
80 | I wonder how that came about. |
This looks abandoned with 2 years of no movement. @michaelh do you still feel this is a WIP?