summaryrefslogtreecommitdiff
path: root/utils/fast_sparse_vector.h
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-18 13:16:03 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-05-18 13:16:03 +0200
commit22d2f3ce5bd3fae2db9744eb66f7b8c3996265d6 (patch)
tree5cebab1bd3a0e77b108a19a786fe541cd7ce546c /utils/fast_sparse_vector.h
parent78a0ee61c2d2d846306b60a8ac862a2d649bcf59 (diff)
parenta70d6d3ed83a32d3cdf4bcb36a087426a4ed2c31 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'utils/fast_sparse_vector.h')
-rw-r--r--utils/fast_sparse_vector.h4
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];