Changeset 406 for trunk/src/sdl


Ignore:
Timestamp:
06/20/15 00:05:17 (10 years ago)
Author:
epyon
Message:
  • code compiles cleanly on maximum warning level
Location:
trunk/src/sdl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sdl/sdl_audio.cc

    r399 r406  
    3636        if ( info )
    3737        {
    38                 int channel = Mix_PlayChannel(-1, (Mix_Chunk*)( info->sdl_sound), 0);
     38                int channel = Mix_PlayChannel(-1, static_cast<Mix_Chunk*>( info->sdl_sound ), 0);
    3939                if ( channel == -1 )
    4040                {
     
    4343                else
    4444                {
    45                         Mix_Volume( channel, int( volume * 128.0f ) );
     45                        Mix_Volume( channel, static_cast<int>( volume * 128.0f ) );
    4646                        if ( pan != 0.0f)
    4747                        {
    48                                 uint8 right = (uint8)( (pan + 1.0f) * 127.0f );
     48                                uint8 right = static_cast<uint8>( (pan + 1.0f) * 127.0f );
    4949                                Mix_SetPanning( channel, 254-right, right );
    5050                        }
     
    6363        if ( info )
    6464        {
    65                 int channel = Mix_PlayChannel(-1, (Mix_Chunk*)( info->sdl_sound), 0);
     65                int channel = Mix_PlayChannel(-1, static_cast<Mix_Chunk*>( info->sdl_sound ), 0);
    6666                if ( channel == -1 )
    6767                {
     
    123123        if ( info )
    124124        {
    125                 Mix_FreeChunk( (Mix_Chunk*)info->sdl_sound );
     125                Mix_FreeChunk( static_cast<Mix_Chunk*>( info->sdl_sound ) );
    126126                m_sounds.destroy( a_sound );
    127127        }
  • trunk/src/sdl/sdl_input.cc

    r395 r406  
    2525        kevent.key.code    = KEY_NONE;
    2626
    27         uint32 ucode = (uint32)ke.keysym.sym;
     27        uint32 ucode = static_cast<uint32>( ke.keysym.sym );
    2828
    2929        // if result is a typable char place it into the structure
     
    3636                        int capslock = !!(ke.keysym.mod & KMOD_CAPS);
    3737                        if ((shifted ^ capslock) != 0) {
    38                                 kevent.key.ascii = (uchar8)SDL_toupper((int)ucode);
     38                                kevent.key.ascii = static_cast<uchar8>( SDL_toupper( static_cast<int>( ucode ) ) );
    3939                        }
    4040                }
  • trunk/src/sdl/sdl_window.cc

    r395 r406  
    6464
    6565        nv::load_gl_library();
    66         NV_LOG_INFO( "OpenGL Vendor       : ", (const char*)glGetString(GL_VENDOR) );
    67         NV_LOG_INFO( "OpenGL Renderer     : ", (const char*)glGetString( GL_RENDERER ) );
    68         NV_LOG_INFO( "OpenGL Version      : ", (const char*)glGetString( GL_VERSION ) );
    69         NV_LOG_INFO( "OpenGL GLSL Version : ", (const char*)glGetString( GL_SHADING_LANGUAGE_VERSION ) );
     66        NV_LOG_INFO( "OpenGL Vendor       : ", reinterpret_cast<const char*>( glGetString(GL_VENDOR) ) );
     67        NV_LOG_INFO( "OpenGL Renderer     : ", reinterpret_cast<const char*>( glGetString( GL_RENDERER ) ) );
     68        NV_LOG_INFO( "OpenGL Version      : ", reinterpret_cast<const char*>( glGetString( GL_VERSION ) ) );
     69        NV_LOG_INFO( "OpenGL GLSL Version : ", reinterpret_cast<const char*>( glGetString( GL_SHADING_LANGUAGE_VERSION ) ) );
    7070        SDL_GL_SetSwapInterval(1);
    7171
Note: See TracChangeset for help on using the changeset viewer.