Changeset 1958


Ignore:
Timestamp:
Sep 27, 2012, 1:36:33 PM (5 years ago)
Author:
sam
Message:

core: fix a bad format string and disable an annoying warning in Array<>.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/array.h

    r1919 r1958  
    192192            return;
    193193
    194         Element *tmp = reinterpret_cast<Element *>
    195                                (new uint8_t [sizeof(Element) * toreserve]);
     194        /* This cast is not very nice, because we kill any alignment
     195         * information we could have. But until C++ gives us the proper
     196         * tools to deal with it, we assume new uint8_t[] returns properly
     197         * aligned data. */
     198        Element *tmp = reinterpret_cast<Element *>(reinterpret_cast<uintptr_t>
     199                               (new uint8_t[sizeof(Element) * toreserve]));
    196200        for (int i = 0; i < m_count; i++)
    197201        {
  • trunk/src/gpu/vertexbuffer.cpp

    r1926 r1958  
    436436            break;
    437437        default:
    438             Log::Error("vertex usage %d is not supported yet\n");
     438            Log::Error("vertex usage %d is not supported yet\n", usage);
    439439            break;
    440440        }
Note: See TracChangeset for help on using the changeset viewer.