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
commitf78eb3465f6798a0b094b6be12775380f4a8e8a7 (patch)
treea886760f1f82e7797f0f58d47b01be57969fa29b /utils/fast_sparse_vector.h
parentbebc7faef73b5943279e692706950c1d6cda7f42 (diff)
parentb95ef85087cda78386ded6a886d050f34879b75c (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];