summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-20 23:06:08 +0000
committergraehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f>2010-07-20 23:06:08 +0000
commit1023d2f94d65bd23f034306f4baeea6a6eafa06d (patch)
treecdb3b3a6bfb958c697ec8d3707be4a7260f0f6e2
parent82e104f38ef76858588490114d01a20a489a6062 (diff)
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
-rw-r--r--decoder/ff.cc2
1 files changed, 1 insertions, 1 deletions
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<char>? ValueArray? (higher performance perhaps, fixed size)
SparseVector<double> 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) {