| 369 | } |
| 370 | |
| 371 | void Array::SetFieldByName(const String& field, const Value& value, const DebugInfo& debugInfo) |
| 372 | { |
| 373 | ObjectLock olock(this); |
| 374 | |
| 375 | int index = Convert::ToLong(field); |
| 376 | |
| 377 | if (index < 0) |
| 378 | BOOST_THROW_EXCEPTION(ScriptError("Array index '" + Convert::ToString(index) + "' is out of bounds.", debugInfo)); |
| 379 | |
| 380 | if (static_cast<size_t>(index) >= GetLength()) |
| 381 | Resize(index + 1); |
| 382 | |
| 383 | Set(index, value); |
| 384 | } |
| 385 | |
| 386 | Array::Iterator icinga::begin(const Array::Ptr& x) |
| 387 | { |
no test coverage detected