Code cleanup to use array.data() rather than &array[0]
[blender.git] / intern / cycles / subd / subd_patch_table.cpp
index 68ec1b2c6a6f0d1a62c6333d578a80c04404f3d6..62572efa88ade12f06dcb02d9da7c1608dfdf4b0 100644 (file)
@@ -214,7 +214,7 @@ void PackedPatchTable::pack(Far::PatchTable* patch_table, int offset)
        }
 
        table.resize(total_size());
-       uint* data = &table[0];
+       uint* data = table.data();
 
        uint* array = data;
        uint* index = array + num_arrays * PATCH_ARRAY_SIZE;
@@ -259,7 +259,7 @@ void PackedPatchTable::pack(Far::PatchTable* patch_table, int offset)
 
 void PackedPatchTable::copy_adjusting_offsets(uint* dest, int doffset)
 {
-       uint* src = &table[0];
+       uint* src = table.data();
 
        /* arrays */
        for(int i = 0; i < num_arrays; i++) {