Book/Code Inconsistencies

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Book/Code Inconsistencies

      The book has the following code as:

      #pragma message("Dsiabled local fabs()implementation to prevent collision w/impl in VS.NET 2k3")
      float inline fabs(float a)
      {
      if (a < 0.0f)
      return -a;
      else
      return a;
      }

      In CPUSpeed.cpp it is:
      #if 0
      #pragma message("Dsiabled local fabs()implementation to prevent collision w/impl in VS.NET 2k3")
      float inline fabs(float a)
      {
      if (a < 0.0f)
      return -a;
      else
      return a;
      }
      #endif

      The difference being the if/endif statements.
      I'm thinking the book is correct, but let me know.

      Also,
      pg. 171 top of the page, the code reads:
      {
      CProcess * p = *i;
      p->OnUpdate( deltaMilliseconds );
      ++i;
      }

      Is that OnUpdate(...) suppose to be VOnUpdate(...)... nothing big really, but had me confused at first. Then again, there is good possiblity I'm wrong. Let me know.

      Alien
    • RE: Book/Code Inconsistencies

      Definitely - the source code is more trustworthy because it was in the oven a little longer. Plus it can always have some hotfixes. It's hard to travel around the world with a sharpie and make corrections to the book!
      Mr.Mike
      Author, Programmer, Brewer, Patriot