Since m_bShouldAnalyze is uses from other functions. I would prefer to use a local copy of it and writ it back at the end of the function. 
This will help the compiler to optimize and avoids possible mutithreading issues in future.