it is better to move this definition to header to make compiler optimize it.