Switching vectors from being 1-based to 0-based.

This is obviously a change that break backwards-compatibility. I hope
I caught all cases where vectors are used ...

I've completely removed the VECTOR_MIN constant. Turns out that was
already not working: some code pieces were nevertheless hard-coding
the 1-based indexing ...
This commit is contained in:
Robin Sommer 2011-05-02 17:01:33 -07:00
parent f564023a12
commit 4aa844aa87
10 changed files with 47 additions and 66 deletions

View file

@ -1051,7 +1051,7 @@ LogVal* LogMgr::ValToLogVal(Val* val, BroType* ty)
for ( int i = 0; i < lval->val.vector_val.size; i++ )
{
lval->val.vector_val.vals[i] =
ValToLogVal(vec->Lookup(VECTOR_MIN + i),
ValToLogVal(vec->Lookup(i),
vec->Type()->YieldType());
}