RefSnapshot operator

move into class definition to hopefully appease MSVC
This commit is contained in:
Michael Davidsaver
2017-08-30 17:04:02 -05:00
parent 08f50e56ac
commit a152a64f1c
2 changed files with 10 additions and 13 deletions

View File

@@ -121,12 +121,12 @@ void RefSnapshot::update()
}
}
RefSnapshot operator-(const RefSnapshot& lhs, const RefSnapshot& rhs)
RefSnapshot RefSnapshot::operator-(const RefSnapshot& rhs) const
{
RefSnapshot ret;
RefSnapshot::cnt_map_t::const_iterator lit = lhs.counts.begin(),
lend= lhs.counts.end(),
RefSnapshot::cnt_map_t::const_iterator lit = counts.begin(),
lend= counts.end(),
rit = rhs.counts.begin(),
rend= rhs.counts.end();
@@ -137,7 +137,7 @@ RefSnapshot operator-(const RefSnapshot& lhs, const RefSnapshot& rhs)
++rit;
} else if(rit==rend || lit->first < rit->first) {
ret.counts[lit->first] = RefSnapshot::Count(lit->second.current, lit->second.current);
ret.counts[lit->first] = RefSnapshot::Count(lit->second.current, long(lit->second.current));
++lit;
} else { // !end and lit->first == rit->first