- added various consts here an there

This commit is contained in:
granzuglia 2018-01-04 11:57:04 +11:00
parent 83aee42b0a
commit ea1623ecf3
2 changed files with 2008 additions and 2007 deletions

View File

@ -217,7 +217,7 @@ namespace vcg
return res;
}
size_t serialize(std::string& str)
size_t serialize(std::string& str) const
{
for (unsigned int ii = 0; ii < ATT_NAMES_DERIVED_CLASS::enumArity(); ++ii)
str.append(((_atts[ii]) ? "1" : "0"));

View File

@ -263,10 +263,10 @@ namespace vcg
}
void serialize(std::string& str)
void serialize(std::string& str) const
{
str.append(_pmmask.to_string());
for (typename PerRendModData::iterator it = _intatts.begin(); it != _intatts.end(); ++it)
for (typename PerRendModData::const_iterator it = _intatts.begin(); it != _intatts.end(); ++it)
{
std::string s;
it->serialize(s);
@ -295,7 +295,8 @@ namespace vcg
}
if (_glopts != NULL)
{
int size = _glopts->serialize(std::string());
std::string tmp;
int size = _glopts->serialize(tmp);
token[i] = str.substr(pos, size);
if (token[i].length() < size)
return false;