From 4b827a22788f40aaed382f40220effe8696e5aef Mon Sep 17 00:00:00 2001 From: graehl Date: Tue, 20 Jul 2010 23:06:08 +0000 Subject: whining comment about lack of safety in taking address of string[0] git-svn-id: https://ws10smt.googlecode.com/svn/trunk@347 ec762483-ff6d-05da-a07a-a48fb63a330f --- decoder/ff.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/decoder/ff.cc b/decoder/ff.cc index 1d52914e..a20b743f 100644 --- a/decoder/ff.cc +++ b/decoder/ff.cc @@ -190,7 +190,7 @@ void ModelSet::AddFeaturesToEdge(const SentenceMetadata& smeta, string* context, prob_t* combination_cost_estimate) const { context->resize(state_size_); - memset(&(*context)[0], 0, state_size_); + memset(&(*context)[0], 0, state_size_); //FIXME: only context.data() is required to be contiguous, and it become sinvalid after next string operation. use SmallVector? ValueArray? (higher performance perhaps, fixed size) SparseVector est_vals; // only computed if combination_cost_estimate is non-NULL if (combination_cost_estimate) *combination_cost_estimate = prob_t::One(); for (int i = 0; i < models_.size(); ++i) { -- cgit v1.2.3