Changeset 918 for trunk/lib


Ignore:
Timestamp:
Nov 30, 2009, 11:33:10 PM (12 years ago)
Author:
Peter Johansson
Message:

avoid compiler warnings on Fedora

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Graph.cc

    r917 r918  
    165165  {
    166166    double frac=range/5;
    167     unsigned char characteristic=log10(frac);
    168     unsigned int power=pow(10,characteristic);
    169     unsigned char msn=frac/power;
     167    unsigned char characteristic= static_cast<unsigned char>(std::log10(frac));
     168    unsigned int power=static_cast<unsigned int>(std::pow(10.0, characteristic));
     169    unsigned char msn=static_cast<unsigned char>(frac/power);
    170170    return power*msn;
    171171  }
Note: See TracChangeset for help on using the changeset viewer.