04-24-2015, 08:34 PM
I think the interface is designed rather poorly. The cPathFinder should have a cPath object in it that should wrap the path being calculated, it should return a const reference to that internal object in GetPath() (and GetPath should not modify it). Calling StartPathfinding (former findPath) should clear the path and start calculating, calling Step (former isCalculationFinished) will calculate a few steps of the path and return true if the calculation is finished. Calling Step after the calculation finishes is not an error; calling StartPathfinding before a path is found resets the current path and starts another search.
Your code style stinks. It may get through the CheckBasicStyle.lua script, but only because the script cannot check the style in all cases. We use spaces around ALL operators, we use CamelCase for function names, and exactly 5 empty lines between function bodies in cpp files. Preprocessor instructions should get regular indent. #includes should go first in the file, then everything else. And the preprocessor macro you use for sharing the source with another app is named just really terribly. Speaking of naming, names like "m_F", "m_G" etc. are useless.
Your code style stinks. It may get through the CheckBasicStyle.lua script, but only because the script cannot check the style in all cases. We use spaces around ALL operators, we use CamelCase for function names, and exactly 5 empty lines between function bodies in cpp files. Preprocessor instructions should get regular indent. #includes should go first in the file, then everything else. And the preprocessor macro you use for sharing the source with another app is named just really terribly. Speaking of naming, names like "m_F", "m_G" etc. are useless.