Changeset 551 for trunk/src


Ignore:
Timestamp:
03/14/17 16:44:18 (8 years ago)
Author:
epyon
Message:
  • clang compatibility
  • ecs upgrades
Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/mesh_manager.cc

    r534 r551  
    2929}
    3030
    31 nv::resource< nv::data_channel_set > nv::mesh_data_manager::get_path( const string_view& path, resource< mesh_data > default /*= resource< mesh_data >()*/, data_node_info* info /*= nullptr */ )
     31nv::resource< nv::data_channel_set > nv::mesh_data_manager::get_path( const string_view& path, resource< mesh_data > def /*= resource< mesh_data >()*/, data_node_info* info /*= nullptr */ )
    3232{
    33         nv::resource< nv::mesh_data > mr = default;
     33        nv::resource< nv::mesh_data > mr = def;
    3434
    3535        nv::string_view sub_mesh_name;
  • trunk/src/image/png_writer.cc

    r534 r551  
    1212#include <stdarg.h> 
    1313
    14 using namespace nv;
     14//using namespace nv;
    1515
    1616#if NV_COMPILER == NV_CLANG
     
    3333};
    3434
    35 #define STBI_MALLOC(sz)     nvmalloc(sz)
    36 #define STBI_REALLOC(p,sz)  nvrealloc(p,sz)
    37 #define STBI_FREE(p)        nvfree(p)
    38 #define STBI_MEMMOVE(d,s,c) nvmemmove(d,s,c)
     35#define STBI_MALLOC(sz)     nv::nvmalloc(sz)
     36#define STBI_REALLOC(p,sz)  nv::nvrealloc(p,sz)
     37#define STBI_FREE(p)        nv::nvfree(p)
     38#define STBI_MEMMOVE(d,s,c) nv::nvmemmove(d,s,c)
    3939
    4040typedef void stbi_write_func( void *context, void *data, int size );
     
    5757
    5858template < typename T >
    59 inline uchar8 byte_cast( T x )
    60 {
    61         return uchar8( ( x ) & 255 );
     59inline nv::uchar8 byte_cast( T x )
     60{
     61        return nv::uchar8( ( x ) & 255 );
    6262}
    6363
     
    246246}
    247247
     248static int iabs( int i )
     249{
     250        return i >= 0 ? i : -i;
     251}
     252
    248253static unsigned char stbiw__paeth( int a, int b, int c )
    249254{
    250         int p = a + b - c, pa = abs( p - a ), pb = abs( p - b ), pc = abs( p - c );
     255        int p = a + b - c, pa = iabs( p - a ), pb = iabs( p - b ), pc = iabs( p - c );
    251256        if ( pa <= pb && pa <= pc ) return byte_cast( a );
    252257        if ( pb <= pc ) return byte_cast( b );
     
    320325                                if ( p ) break;
    321326                                for ( i = 0; i < x*n; ++i )
    322                                         est += abs( (signed char)line_buffer[i] );
     327                                        est += iabs( (signed char)line_buffer[i] );
    323328                                if ( est < bestval ) { bestval = est; best = k; }
    324329                        }
  • trunk/src/lua/lua_proxy.cc

    r541 r551  
    7676}
    7777
     78const nv::type_database* nv::lua::stack_proxy::get_type_db() const
     79{
     80        NV_ASSERT( m_state->get_type_data(), "type database not created!" );
     81        return m_state->get_type_data()->get_type_database();
     82}
     83
    7884nv::string_view nv::lua::stack_proxy::get_string_view() const
    7985{
Note: See TracChangeset for help on using the changeset viewer.