mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Parameters: removed trailing 0 for double/float parameters, to avoid serializing with them (so that we don't have the 0.0 != 0 when loading parameters from database)
This commit is contained in:
@@ -94,11 +94,13 @@ std::string Parameters::serialize(const ParametersMap & parameters)
|
||||
// make sure there are no commas instead of dots
|
||||
output << iter->first << ":" << uReplaceChar(iter->second, ',', '.');
|
||||
}
|
||||
UDEBUG("output=%s", output.str().c_str());
|
||||
return output.str();
|
||||
}
|
||||
|
||||
ParametersMap Parameters::deserialize(const std::string & parameters)
|
||||
{
|
||||
UDEBUG("parameters=%s", parameters.c_str());
|
||||
ParametersMap output;
|
||||
std::list<std::string> tuplets = uSplit(parameters, ';');
|
||||
for(std::list<std::string>::iterator iter=tuplets.begin(); iter!=tuplets.end(); ++iter)
|
||||
|
||||
Reference in New Issue
Block a user