sim: Remove _numContexts member in System class

A System object has a _numContexts member variable which represent the
number of ThreadContext registered in the System.  Since this has to
match the size of the ThreadContext vector, this patch removes the
manually cached size. This was usually used as a for-loop index, whereas
we want to enforce the use of range-based loops whenever possible.

Change-Id: I1ba317c0393bcc9c1aeebbb1fc22d7b2bc2cf90c
Signed-off-by: Giacomo Travaglini <>
Reviewed-by: Andreas Sandberg <>
Reviewed-by: Gabe Black <>
Maintainer: Brandon Potter <>
4 files changed