Changeset 2610


Ignore:
Timestamp:
Mar 28, 2013, 12:43:11 PM (7 years ago)
Author:
sam
Message:

base: a few minor style tweaks.

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/entity.cpp

    r2216 r2610  
    5353void Entity::TickGame(float seconds)
    5454{
    55     (void)seconds;
     55    UNUSED(seconds);
    5656#if !LOL_RELEASE
    5757    if (m_tickstate != STATE_PRETICK_GAME)
  • trunk/src/gpu/shader.cpp

    r2546 r2610  
    164164{
    165165    /* XXX: do nothing! the shader should remain in cache */
    166     (void)shader;
     166    UNUSED(shader);
    167167}
    168168
  • trunk/src/gpu/vertexbuffer.cpp

    r2591 r2610  
    240240    case MeshPrimitive::Triangles:
    241241        /* FIXME: ignores most of the arguments! */
    242         (void)vbase; (void)vskip; (void)vcount; (void)skip;
     242        UNUSED(vbase, vskip, vcount, skip);
    243243        glDrawElements(GL_TRIANGLES, count, GL_UNSIGNED_SHORT, 0);
    244244        break;
    245245    case MeshPrimitive::TriangleStrips:
    246246        /* FIXME: ignores most of the arguments! */
    247         (void)vbase; (void)vskip; (void)vcount; (void)skip;
     247        UNUSED(vbase, vskip, vcount, skip);
    248248        glDrawElements(GL_TRIANGLE_STRIP, count, GL_UNSIGNED_SHORT, 0);
    249249        break;
    250250    case MeshPrimitive::TriangleFans:
    251251        /* FIXME: ignores most of the arguments! */
    252         (void)vbase; (void)vskip; (void)vcount; (void)skip;
     252        UNUSED(vbase, vskip, vcount, skip);
    253253        glDrawElements(GL_TRIANGLE_FAN, count, GL_UNSIGNED_SHORT, 0);
    254254        break;
    255255    case MeshPrimitive::Points:
    256256        /* FIXME: ignores most of the arguments! */
    257         (void)vbase; (void)vskip; (void)vcount; (void)skip;
     257        UNUSED(vbase, vskip, vcount, skip);
    258258        glDrawElements(GL_POINTS, count, GL_UNSIGNED_SHORT, 0);
    259259        break;
    260260    case MeshPrimitive::Lines:
    261261        /* FIXME: ignores most of the arguments! */
    262         (void)vbase; (void)vskip; (void)vcount; (void)skip;
     262        UNUSED(vbase, vskip, vcount, skip);
    263263        glDrawElements(GL_LINES, count, GL_UNSIGNED_SHORT, 0);
    264264        break;
     
    646646#else
    647647    /* FIXME: is there a way to use "size"? */
    648     (void)size;
     648    UNUSED(size);
    649649    return m_data->m_memory + offset;
    650650#endif
  • trunk/src/lol/gpu/vertexbuffer.h

    r2507 r2610  
    159159
    160160#define LOL_TYPE(T) \
    161     static uint8_t GetType(T *x) { (void)x; return Type##T; }
     161    static uint8_t GetType(T *x) { UNUSED(x); return Type##T; }
    162162
    163163    LOL_TYPE(void)
     
    192192inline void VertexStreamBase::AddStream<void>(int n, VertexUsage usage)
    193193{
    194     (void)usage;
     194    UNUSED(usage);
    195195    m_streams[n].size = 0;
    196196}
  • trunk/src/platform/sdl/sdlinput.cpp

    r2506 r2610  
    202202            Input::KeyPressed(i, seconds);
    203203#else
    204     (void)seconds;
     204    UNUSED(seconds);
    205205#endif
    206206#endif
  • trunk/src/tileset.cpp

    r2609 r2610  
    6868{
    6969    Init(path);
    70 
    71     m_drawgroup = DRAWGROUP_BEFORE;
    7270}
    7371
     
    8684        if (size.x <= 0 || size.y <= 0)
    8785            size = ivec2(32, 32);
    88         count = ivec2(max(1, m_data->m_image_size.x / size.x),
    89                       max(1, m_data->m_image_size.y / size.y));
     86        count = max(ivec2(1, 1), m_data->m_image_size / size);
    9087    }
    9188
     
    9693                      size * ivec2(i + 1, j + 1)));
    9794    }
    98 
    99     m_drawgroup = DRAWGROUP_BEFORE;
    10095}
    10196
     
    109104    m_data->m_texture_size = ivec2(PotUp(m_data->m_image_size.x),
    110105                                   PotUp(m_data->m_image_size.y));
     106
     107    m_drawgroup = DRAWGROUP_BEFORE;
    111108}
    112109
     
    195192ivec2 TileSet::GetTileSize(int tileid) const
    196193{
    197     (void)tileid;
    198 
    199194    ibox2 const &box = m_data->m_tiles[tileid].m1;
    200195    return box.B - box.A;
Note: See TracChangeset for help on using the changeset viewer.