Misc. tweaks to vector slicing implementation

* Minor style/format changes

* Fix a signed/unsigned comparison compiler warning

* Use a non-fatal error for non-integral slice indices so we can
  report any further scripting errors instead of stopping the parse
  right there
This commit is contained in:
Jon Siwek 2019-06-18 17:25:32 -07:00
parent 502ad9abc3
commit 91835752b7
5 changed files with 18 additions and 10 deletions

View file

@ -3417,6 +3417,7 @@ bool VectorVal::Insert(unsigned int index, Val* element)
}
vector<Val*>::iterator it;
if ( index < val.vector_val->size() )
it = std::next(val.vector_val->begin(), index);
else