(API Change) Remove pointers from all typedefs
Typedef pointers are unsafe. If you do: typedef struct bla *bla_t; then you cannot use it as a constant, such as: const bla_t, because that constant will be to the pointer itself rather than to the underlying data. I admit this was a fundamental mistake that must be corrected. All typedefs that were pointer types will now have their pointers removed from the type itself, and the pointers will be used when they are actually used as variables/parameters/returns instead. This does not break ABI though, which is pretty nice.
This commit is contained in:
@@ -93,7 +93,7 @@ inline void gs_vertex_buffer::InitBuffer(const size_t elementSize,
|
||||
throw HRError("Failed to create buffer", hr);
|
||||
}
|
||||
|
||||
gs_vertex_buffer::gs_vertex_buffer(gs_device_t device, struct gs_vb_data *data,
|
||||
gs_vertex_buffer::gs_vertex_buffer(gs_device_t *device, struct gs_vb_data *data,
|
||||
uint32_t flags)
|
||||
: device (device),
|
||||
vbd (data),
|
||||
|
Reference in New Issue
Block a user