//go:build !ark_debug

package ecs

import 

// Next advances the query's cursor to the next entity.
func ( *UnsafeQuery) () bool {
	if int64(.cursor.index) < .cursor.maxIndex {
		.cursor.index++
		return true
	}
	return .nextTableOrArchetype()
}

// Entity returns the current entity.
func ( *UnsafeQuery) () Entity {
	return .table.GetEntity(.cursor.index)
}

// Get returns the queried components of the current entity.
//
// ⚠️ Do not store the obtained pointer outside of the current context (i.e. the query loop)!
func ( *UnsafeQuery) ( ID) unsafe.Pointer {
	return .table.Get(, .cursor.index)
}