mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-04 16:57:46 +08:00
Fixed warning (cleanup of unused words before clearing the memory... saving time to dB )
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@677 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -813,15 +813,11 @@ void Memory::clear()
|
|||||||
{
|
{
|
||||||
ULOGGER_DEBUG("");
|
ULOGGER_DEBUG("");
|
||||||
|
|
||||||
|
this->cleanUnusedWords();
|
||||||
|
|
||||||
if(_dbDriver)
|
if(_dbDriver)
|
||||||
{
|
{
|
||||||
int size = 0;
|
_dbDriver->addStatisticsAfterRunSurf(_vwd->getVisualWords().size());
|
||||||
if(_vwd)
|
|
||||||
{
|
|
||||||
size = _vwd->getVisualWords().size();
|
|
||||||
}
|
|
||||||
|
|
||||||
_dbDriver->addStatisticsAfterRunSurf(size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_dbDriver)
|
if(_dbDriver)
|
||||||
|
|||||||
@@ -386,8 +386,11 @@ void VWDictionary::addWordRef(int wordId, int signatureId)
|
|||||||
if(!vw)
|
if(!vw)
|
||||||
{
|
{
|
||||||
vw = uValue(_unusedWords, wordId, vw);
|
vw = uValue(_unusedWords, wordId, vw);
|
||||||
_visualWords.insert(std::pair<int, VisualWord*>(vw->id(), vw));
|
if(vw)
|
||||||
_unusedWords.erase(vw->id());
|
{
|
||||||
|
_visualWords.insert(std::pair<int, VisualWord*>(vw->id(), vw));
|
||||||
|
_unusedWords.erase(vw->id());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(vw)
|
if(vw)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user