diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-05-16 07:09:16 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-05-16 07:09:16 -0400 |
commit | a448faf30fa46c006b1d38c6aee64a7aad29ac5e (patch) | |
tree | bdfe7c401de04433e80680e350b05ad4d37b7e59 /utils/fast_sparse_vector.h | |
parent | 0f1e696690b18259acd79c3469d00a72aca00161 (diff) |
clean up
Diffstat (limited to 'utils/fast_sparse_vector.h')
-rw-r--r-- | utils/fast_sparse_vector.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/fast_sparse_vector.h b/utils/fast_sparse_vector.h index 68caa704..3cc48f8e 100644 --- a/utils/fast_sparse_vector.h +++ b/utils/fast_sparse_vector.h @@ -14,7 +14,9 @@ #include <cassert> #include <vector> +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #include <boost/static_assert.hpp> #if HAVE_BOOST_ARCHIVE_TEXT_OARCHIVE_HPP @@ -323,7 +325,7 @@ class FastSparseVector { std::memcpy(&data_, t, sizeof(data_)); } private: - static inline T& extend_vector(std::vector<T> &v,int i) { + static inline T& extend_vector(std::vector<T> &v,size_t i) { if (i>=v.size()) v.resize(i+1); return v[i]; |