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
commit4b827a22788f40aaed382f40220effe8696e5aef (patch)
tree9cbb7fbcf81ae61b737d47761cc23408494d061c
parent42c1346c6bce064601beb81bb954ea5e30e9f43d (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) {