fix cast warning in CTaskFileHelper.cpp