Ignore:
Timestamp:
06/13/15 11:47:09 (10 years ago)
Author:
epyon
Message:
  • naming cleanup
  • string_ref -> string_view (compatible with C++17 standard!)
  • *_ref and const_*_ref, renamed to _ref and _view for consistency
File:
1 edited

Legend:

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

    r395 r399  
    3030}
    3131
    32 void profiler::start_profile( const string_ref& tag )
     32void profiler::start_profile( const string_view& tag )
    3333{
    3434        if ( tag != m_current->m_tag )
     
    4747}
    4848
    49 profiler::node::node( const string_ref& tag, node* parent )
     49profiler::node::node( const string_view& tag, node* parent )
    5050        : m_tag( tag.to_string() )
    5151        , m_parent( parent )
     
    5858}
    5959
    60 profiler::node* profiler::node::request_child( const string_ref& tag )
     60profiler::node* profiler::node::request_child( const string_view& tag )
    6161{
    6262        std::string stag( tag.to_string() );
     
    110110        char buffer[128];
    111111        snprintf( buffer, 128, "%-23s %6s %6s %9s %6s", "TAG", "%PARNT", "CALLS", "TOTAL(ms)", "AVG(ms)" );
    112         NV_LOG_INFO( string_ref( buffer, nvstrlen( buffer ) ) );
     112        NV_LOG_INFO( string_view( buffer, nvstrlen( buffer ) ) );
    113113        log_node_children( 0, m_root );
    114114        NV_LOG_INFO( "-- PROFILER REPORT END ---------------------------------" );
     
    131131                        snprintf( buffer + indent, 128 - indent, "%*.*s %6.2f %6d %9.2f %6.2f", indent - 23, 23 - indent,
    132132                                c->m_tag.c_str(), pparent, calls, total_ms, avg_ms );
    133                         NV_LOG_INFO( string_ref( buffer, nvstrlen( buffer ) ) );
     133                        NV_LOG_INFO( string_view( buffer, nvstrlen( buffer ) ) );
    134134                        if ( c->m_children.size() > 0 )
    135135                        {
Note: See TracChangeset for help on using the changeset viewer.