Showing the changes to libraries/script-engine/src/ModelScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -60,19 +60,19 @@ QScriptValue ModelScriptingInterface::appendMeshes(MeshProxyList in) { · 59 unmodified lines | ||
| 60 | 60 | |
| 61 | 61 | // alloc the resulting mesh |
| 62 | 62 | gpu::Resource::Size combinedVertexSize = totalVertexCount * sizeof(glm::vec3); |
| 63 | − std::unique_ptr<unsigned char> combinedVertexData{ new unsigned char[combinedVertexSize] }; | |
| 63 | + std::unique_ptr<unsigned char[]> combinedVertexData{ new unsigned char[combinedVertexSize] }; | |
| 64 | 64 | unsigned char* combinedVertexDataCursor = combinedVertexData.get(); |
| 65 | 65 | |
| 66 | 66 | gpu::Resource::Size combinedColorSize = totalColorCount * sizeof(glm::vec3); |
| 67 | − std::unique_ptr<unsigned char> combinedColorData{ new unsigned char[combinedColorSize] }; | |
| 67 | + std::unique_ptr<unsigned char[]> combinedColorData{ new unsigned char[combinedColorSize] }; | |
| 68 | 68 | unsigned char* combinedColorDataCursor = combinedColorData.get(); |
| 69 | 69 | |
| 70 | 70 | gpu::Resource::Size combinedNormalSize = totalNormalCount * sizeof(glm::vec3); |
| 71 | − std::unique_ptr<unsigned char> combinedNormalData{ new unsigned char[combinedNormalSize] }; | |
| 71 | + std::unique_ptr<unsigned char[]> combinedNormalData{ new unsigned char[combinedNormalSize] }; | |
| 72 | 72 | unsigned char* combinedNormalDataCursor = combinedNormalData.get(); |
| 73 | 73 | |
| 74 | 74 | gpu::Resource::Size combinedIndexSize = totalIndexCount * sizeof(uint32_t); |
| 75 | − std::unique_ptr<unsigned char> combinedIndexData{ new unsigned char[combinedIndexSize] }; | |
| 75 | + std::unique_ptr<unsigned char[]> combinedIndexData{ new unsigned char[combinedIndexSize] }; | |
| 76 | 76 | unsigned char* combinedIndexDataCursor = combinedIndexData.get(); |
| 77 | 77 | |
| 78 | 78 | uint32_t indexStartOffset { 0 }; |