From 71c4918f05a4b380dfaebfabcc1847c1c6d497dd Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 27 May 2012 15:34:44 -0400 Subject: clean up --- utils/sparse_vector.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'utils/sparse_vector.cc') diff --git a/utils/sparse_vector.cc b/utils/sparse_vector.cc index 27bb88dd..00e7bd60 100644 --- a/utils/sparse_vector.cc +++ b/utils/sparse_vector.cc @@ -32,7 +32,7 @@ void Encode(double objective, const SparseVector& v, ostream* out) { *reinterpret_cast(&data[off_objective]) = objective; *reinterpret_cast(&data[off_num_feats]) = num_feats; char* cur = &data[off_data]; - assert(cur - data == off_data); + assert(static_cast(cur - data) == off_data); for (const_iterator it = v.begin(); it != v.end(); ++it) { const string& fname = FD::Convert(it->first); *cur++ = static_cast(fname.size()); // name len @@ -41,10 +41,10 @@ void Encode(double objective, const SparseVector& v, ostream* out) { *reinterpret_cast(cur) = it->second; cur += sizeof(double); } - assert(cur - data == off_magic); + assert(static_cast(cur - data) == off_magic); *reinterpret_cast(cur) = 0xBAABABBAu; cur += sizeof(unsigned int); - assert(cur - data == tot_size); + assert(static_cast(cur - data) == tot_size); b64encode(data, tot_size, out); delete[] data; } -- cgit v1.2.3