win32 doesn't have ssize_t

This commit is contained in:
Michael Davidsaver
2017-08-30 14:20:10 -05:00
parent 9ae221ca0c
commit 08f50e56ac
2 changed files with 4 additions and 4 deletions

View File

@@ -59,9 +59,9 @@ public:
//! A single count
struct Count {
size_t current;
ssize_t delta; //!< current - previous
long delta; //!< current - previous
Count() :current(0u), delta(0) {}
explicit Count(size_t c, ssize_t d) :current(c), delta(d) {}
explicit Count(size_t c, long d) :current(c), delta(d) {}
bool operator==(const Count& o) const
{ return current==o.current && delta==o.delta; }
};

View File

@@ -133,7 +133,7 @@ RefSnapshot operator-(const RefSnapshot& lhs, const RefSnapshot& rhs)
while(lit!=lend || rit!=rend)
{
if(lit==lend || (rit!=rend && lit->first > rit->first)) {
ret.counts[rit->first] = RefSnapshot::Count(0, -ssize_t(rit->second.current));
ret.counts[rit->first] = RefSnapshot::Count(0, -long(rit->second.current));
++rit;
} else if(rit==rend || lit->first < rit->first) {
@@ -142,7 +142,7 @@ RefSnapshot operator-(const RefSnapshot& lhs, const RefSnapshot& rhs)
} else { // !end and lit->first == rit->first
ret.counts[lit->first] = RefSnapshot::Count(lit->second.current,
ssize_t(lit->second.current) - ssize_t(rit->second.current));
long(lit->second.current) - long(rit->second.current));
++lit;
++rit;
}