Commit 6596e7c9 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Update get offset

parent 19c9322c
Pipeline #144082 passed with stages
in 1 minute and 3 seconds
......@@ -89,6 +89,20 @@ void printRemaningOffset(std::ofstream & fs, const PVecPossibleOffset & vecOffse
}
}
///Get the first possible offset
/** @param vecOffset : vector of possible offset
* @return first possible offset
*/
size_t getFirstOffset(const PVecPossibleOffset & vecOffset){
size_t offset(0lu);
PVecPossibleOffset::const_iterator it(vecOffset.begin());
while(*it){
++offset;
++it;
}
return offset;
}
///Default constructor of POffsetFinder
POffsetFinder::POffsetFinder(){
initialisationPOffsetFinder();
......@@ -194,7 +208,7 @@ bool POffsetFinder::saveYml(const std::string & fileName) const{
printRemaningOffset(fs, it->getVecOffset(), "#\t\t");
}
fs << "# Let's take the fist one" << std::endl;
fs << it->getName() << ": " << it->getVecOffset().front() << std::endl;
fs << it->getName() << ": " << getFirstOffset(it->getVecOffset()) << std::endl;
}else{
fs << "# Attribute '"<<it->getName()<<"' : offset not found" << std::endl;
fs << it->getName() << ": UNDEFINED" << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment