Reorganize GitInfo + Reorder some initialization to prevent some warning
messages
This commit is contained in:
parent
87ecb22ea5
commit
2a11586d01
@ -29,5 +29,5 @@ Triskele suit partiellement le [[https://nvie.com/posts/a-successful-git-branchi
|
||||
# Pour une branche locale
|
||||
$ git branch -d nomDeBranche
|
||||
# Pour une branche distante
|
||||
$ git branch -rd nomDeBranche
|
||||
$ git push origin --delete nomDeBranch
|
||||
|
@ -60,19 +60,21 @@ Border::Border ()
|
||||
inline
|
||||
Border::Border (const Size &size, bool defaultVal)
|
||||
: pixelsCount (getPixelsCount (size)),
|
||||
size (size),
|
||||
mapLength (getMapLength (pixelsCount)),
|
||||
size (size),
|
||||
map (),
|
||||
defaultVal (defaultVal) {
|
||||
}
|
||||
|
||||
inline
|
||||
Border::Border (const Border &border, const Rect &tile)
|
||||
: size (tile.width, tile.height),
|
||||
pixelsCount (getPixelsCount (size)),
|
||||
mapLength (getMapLength (pixelsCount)),
|
||||
: size (tile.width, tile.height),
|
||||
map (),
|
||||
defaultVal (border.defaultVal) {
|
||||
|
||||
pixelsCount = getPixelsCount (size);
|
||||
mapLength = getMapLength (pixelsCount);
|
||||
|
||||
if (!border.map.size ())
|
||||
return;
|
||||
// XXX todo
|
||||
|
@ -12,9 +12,9 @@ IImage::gdalCount = 0;
|
||||
|
||||
IImage::IImage (const string &imageFileName)
|
||||
: fileName (imageFileName),
|
||||
read (false),
|
||||
gdalInputDataset (nullptr),
|
||||
gdalOutputDataset (nullptr)
|
||||
gdalOutputDataset (nullptr),
|
||||
read (false)
|
||||
{
|
||||
}
|
||||
|
||||
|
32
src/Tree.cpp
32
src/Tree.cpp
@ -7,21 +7,21 @@ using namespace otb::triskele::arrayTree;
|
||||
using namespace std;
|
||||
|
||||
Tree::Tree (const DimSideImg &width, const DimSideImg &height, unsigned int coreCount)
|
||||
: Tree (coreCount)
|
||||
: Tree(coreCount)
|
||||
{
|
||||
resize (width, height);
|
||||
resize(width, height);
|
||||
}
|
||||
|
||||
Tree::Tree (unsigned int coreCount)
|
||||
: size (),
|
||||
coreCount (coreCount),
|
||||
leafCount (0),
|
||||
nodeCount (0),
|
||||
leafParents (),
|
||||
compParents (nullptr),
|
||||
children (),
|
||||
childrenStart (),
|
||||
state (State::Void)
|
||||
: coreCount(coreCount),
|
||||
size(),
|
||||
leafCount(0),
|
||||
nodeCount(0),
|
||||
leafParents(),
|
||||
compParents(nullptr),
|
||||
childrenStart(),
|
||||
children(),
|
||||
state(State::Void)
|
||||
{
|
||||
clear ();
|
||||
}
|
||||
@ -195,7 +195,7 @@ Tree::checkSpare () const {
|
||||
maxParent = leafParents[leafId];
|
||||
});
|
||||
}
|
||||
DimImg *childCount = (DimImg*)&childrenStart[2];
|
||||
// DimImg *childCount = (DimImg*)&childrenStart[2]; // Only used for the assert (so put to comment to prevent warnings)
|
||||
for (unsigned int i = 0; i < tileCount; ++i) {
|
||||
DimImg base = vertexMaxBounds [i], maxParent = maxParents [i];
|
||||
for (DimImg compId = base; compId < maxParent; ++compId) {
|
||||
@ -203,7 +203,8 @@ Tree::checkSpare () const {
|
||||
BOOST_ASSERT (compParents[compId] != compId);
|
||||
BOOST_ASSERT (compParents[compId] < maxParent);
|
||||
if (compParents[compId] < compId)
|
||||
BOOST_ASSERT (childCount[compParents[compId]] > childCount[compId]);
|
||||
BOOST_ASSERT (*(childrenStart + 2 + compParents[compId]) > *(childrenStart + 2 + compId));
|
||||
//BOOST_ASSERT (childCount[compParents[compId]] > childCount[compId]); // Edited line to prevent the "Unused variable" warning
|
||||
}
|
||||
BOOST_ASSERT (compParents[maxParent] == DimImg_MAX);
|
||||
}
|
||||
@ -319,10 +320,11 @@ Tree::CPrintTree::print (ostream &out) const {
|
||||
if (!onRecord)
|
||||
out << printMap (&tree.children[0], doubleSize, nodeCount-1) << endl << endl;
|
||||
if (tree.weightBounds.size ()) {
|
||||
out << "weightBounds: " << endl
|
||||
<< printMap (&tree.weightBounds[0], tree.size, tree.weightBounds.size ()) << endl << endl;
|
||||
return out << "weightBounds: " << endl
|
||||
<< printMap (&tree.weightBounds[0], tree.size, tree.weightBounds.size ()) << endl << endl;
|
||||
} else
|
||||
return out << "no weightBounds" << endl << endl;
|
||||
|
||||
}
|
||||
|
||||
Tree::CPrintTree
|
||||
|
Loading…
Reference in New Issue
Block a user