Surface usa std::vector en lloc de shared_ptr<Uint8[]>
This commit is contained in:
@@ -16,11 +16,11 @@ using Palette = std::array<Uint32, 256>;
|
||||
|
||||
// Definición de Surface para imágenes con paleta
|
||||
struct Surface {
|
||||
std::shared_ptr<Uint8[]> data; // NOLINT(modernize-avoid-c-arrays)
|
||||
std::vector<Uint8> data;
|
||||
Uint16 w, h;
|
||||
|
||||
// Constructor
|
||||
Surface(Uint16 width, Uint16 height, std::shared_ptr<Uint8[]> pixels) // NOLINT(modernize-avoid-c-arrays)
|
||||
Surface(Uint16 width, Uint16 height, std::vector<Uint8> pixels)
|
||||
: data(std::move(pixels)),
|
||||
w(width),
|
||||
h(height) {}
|
||||
|
||||
Reference in New Issue
Block a user