Ignore:
Timestamp:
06/13/15 21:51:27 (10 years ago)
Author:
epyon
Message:
  • cleanups of clang warnings (gotta love them all)
  • only nv-core for now (this will take a while for the whole source)
  • mainly C++ casts instead of C-style casts, but also a few bugs fixed!
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/profiler.cc

    r399 r402  
    124124                if ( c->m_calls > 0 )
    125125                {
    126                         f64 pparent = ( (f64)c->m_total_time_us / (f64)c->m_parent->m_total_time_us ) * 100.f;
     126                        f64 ftotal_time_us = static_cast<f64>( c->m_total_time_us );
     127                        f64 pparent = ( ftotal_time_us / static_cast<f64>( c->m_parent->m_total_time_us ) ) * 100.f;
    127128                        uint32 calls       = c->m_calls;
    128                         f64 total_ms = c->m_total_time_us / 1000.f;
    129                         f64 avg_ms = ( (f64)c->m_total_time_us / (f64)c->m_calls ) / 1000.f;
     129                        f64 total_ms = ftotal_time_us / 1000.f;
     130                        f64 avg_ms = ( ftotal_time_us / static_cast<f64>( c->m_calls ) ) / 1000.f;
    130131                        if ( indent > 0 ) nvmemset( buffer, '-', indent );
    131132                        snprintf( buffer + indent, 128 - indent, "%*.*s %6.2f %6d %9.2f %6.2f", indent - 23, 23 - indent,
Note: See TracChangeset for help on using the changeset viewer.