Please, edit your post adding code tags around code snippets! Otherwise it is very hard to read/understand what you did.
And BTW, it is not a good practice using m_ prefix for class static members!