Menu

[Bug] HMPImporter::InternReadFile

2009-01-20
2013-06-03
  • Andy Maloney

    Andy Maloney - 2009-01-20

    In HMPImporter::InternReadFile(), we have this nifty line:

        // Allocate storage and copy the contents of the file to a memory buffer
        pScene = pScene;

    pScene is an argument to the function AND it's a member variable in MDLImporter which is inherited by HMPImporter.

    My preferred fix is to rename the member variable mScene.  [I believe it's good practice to name all member variables with a prefix - I use 'm' - but I know not everyone agrees...]

     
    • Alexander Gessler

      >> I believe it's good practice to name all member variables with a prefix - I use 'm' - but I know not everyone agrees...

      Yes, we did that in the public API, but it is not my personal preference.

      However, problem was caused by 'late-night-refactoring' where I removed the 'this->' :-) Of course it would have never happened if the identifiers didn't match ... probably they do for historical reasons, don't know.

      Fixed, HMP loads again. Thanks for posting this issue.

      Bye,
      Alex

       

Log in to post a comment.