summaryrefslogtreecommitdiff
path: root/utils/fast_sparse_vector.h
diff options
context:
space:
mode:
authorVictor Chahuneau <vchahune@cs.cmu.edu>2012-05-17 10:46:23 -0400
committerVictor Chahuneau <vchahune@cs.cmu.edu>2012-05-17 10:46:23 -0400
commit3d44c4e9c80472c4e3f39bfbf730c192328c839c (patch)
treeb5ab7097634b3d5d1071bd53844fe368ec1dd8dc /utils/fast_sparse_vector.h
parent141f566baf82129fd339fa28e1e98a17c6e37dcc (diff)
parent75d0f86f8f949e37c600096accf85d5521940f40 (diff)
Merge branch 'master' of https://github.com/redpony/cdec
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];